mirror of
https://github.com/ciromattia/kcc
synced 2026-09-01 16:37:06 +00:00
Preserve input file order using list instead of set (#1209)
* Preserve input file order using list instead of set * Simplify list comprehension and fix append for sources * Remove redundant list() conversion
This commit is contained in:
@@ -65,16 +65,16 @@ def main(argv=None):
|
|||||||
parser.print_help()
|
parser.print_help()
|
||||||
return 0
|
return 0
|
||||||
if sys.platform.startswith('win'):
|
if sys.platform.startswith('win'):
|
||||||
sources = set([source for option in options.input for source in glob(escape(option))])
|
sources = [source for option in options.input for source in glob(escape(option))]
|
||||||
else:
|
else:
|
||||||
sources = set(options.input)
|
sources = options.input
|
||||||
if len(sources) == 0:
|
if len(sources) == 0:
|
||||||
print('No matching files found.')
|
print('No matching files found.')
|
||||||
return 1
|
return 1
|
||||||
if options.filefusion:
|
if options.filefusion:
|
||||||
fusion_path = makeFusion(list(sources))
|
fusion_path = makeFusion(list(sources))
|
||||||
sources.clear()
|
sources.clear()
|
||||||
sources.add(fusion_path)
|
sources.append(fusion_path)
|
||||||
for source in sources:
|
for source in sources:
|
||||||
source = source.rstrip('\\').rstrip('/')
|
source = source.rstrip('\\').rstrip('/')
|
||||||
options = copy(args)
|
options = copy(args)
|
||||||
|
|||||||
Reference in New Issue
Block a user