1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-25 22:47:28 +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:
フィルターペーパー
2026-01-06 12:52:53 +08:00
committed by GitHub
parent 8e42fc1162
commit 7897627c43

View File

@@ -65,16 +65,16 @@ def main(argv=None):
parser.print_help()
return 0
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:
sources = set(options.input)
sources = options.input
if len(sources) == 0:
print('No matching files found.')
return 1
if options.filefusion:
fusion_path = makeFusion(list(sources))
sources.clear()
sources.add(fusion_path)
sources.append(fusion_path)
for source in sources:
source = source.rstrip('\\').rstrip('/')
options = copy(args)