Skip to content

Commit 32c1ebf

Browse files
committed
Use windows slashes when applicable
1 parent 084c8c2 commit 32c1ebf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

__pycache__/tags.cpython-38.pyc

27 Bytes
Binary file not shown.

tags.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import math
55
import json
66
import re
7+
import sys
78

89
done = []
910

@@ -301,8 +302,12 @@ def start(packName, packId, packDesc):
301302
dirs[:] = [d for d in dirs if not d[0] == "."]
302303
for file in files:
303304
path = os.path.relpath(os.path.join(subdir, file))
304-
if file.endswith(".mctag") and not path[path.index("/") + 1:] in done:
305-
genTag(path[path.index("/") + 1:], packName, packId)
305+
if sys.platform == "win32":
306+
if file.endswith(".mctag") and not path[path.index("\\") + 1:] in done:
307+
genTag(path[path.index("/") + 1:], packName, packId)
308+
else:
309+
if file.endswith(".mctag") and not path[path.index("/") + 1:] in done:
310+
genTag(path[path.index("/") + 1:], packName, packId)
306311

307312
if __name__ == "__main__":
308313
start(main.packName, main.packId, main.packDesc)

0 commit comments

Comments
 (0)