Skip to content

Commit fe19c59

Browse files
committed
Extracting Java methods: if there are no subdirectories, extract from the root dir
1 parent a787331 commit fe19c59

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

JavaExtractor/extract.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,9 @@ def ExtractFeaturesForDirsList(args, dirs):
9292
os.system(command)
9393
elif args.dir is not None:
9494
subdirs = get_immediate_subdirectories(args.dir)
95-
ExtractFeaturesForDirsList(args, subdirs)
96-
95+
to_extract = subdirs
96+
if len(subdirs) == 0:
97+
to_extract = [sys.argv[2]]
98+
ExtractFeaturesForDirsList(args, to_extract)
99+
100+

0 commit comments

Comments
 (0)