File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -103,3 +103,12 @@ def test_ignore_invalid_package_file(self):
103
103
"src/main.c" ,
104
104
"appinfo.json"
105
105
], "" , "appinfo.json" )
106
+
107
+ def test_PR_317 (self ):
108
+ """ PR 317 fixes a bug where find_project_root would fail with 11 character filenames """
109
+ self .run_test ([
110
+ "MAINTAINERS" ,
111
+ "package.json" ,
112
+ "src/"
113
+ "src/main.c" ,
114
+ ], "" , "package.json" )
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ def find_project_root_and_manifest(project_items):
56
56
# Check if the file is one of the kinds of manifest file
57
57
for name in MANIFEST_KINDS :
58
58
dir_end = base_dir .rfind (name )
59
+ if dir_end == - 1 :
60
+ continue
59
61
# Ensure that the file is actually a manifest file
60
62
if dir_end + len (name ) == len (base_dir ):
61
63
if is_manifest (name , item .read ()):
You can’t perform that action at this time.
0 commit comments