Add windowsPaths setting

This commit is contained in:
Fierelier 2021-09-26 04:31:55 +02:00
parent 4ffb1f2f7a
commit 710c68a933
2 changed files with 12 additions and 5 deletions

View File

@ -4,3 +4,6 @@
# - reflink: this method uses a feature in certain copy-on-write file systems, like btrfs, which allows you to make a "link" of a file, similar to hardlinks, but you can edit it as well. only changes are saved additionally. note that btrfs and other filesystems that support this feature don't tend to be the default filesystem in many operating systems. this has implementations for linux, and btrfs on windows (https://github.com/maharmstone/btrfs)
# - copy: copy the files. this takes longer and requires more space, but also makes it possible for you to edit the files afterwards without the use of the modloader.
linkMethod = hardlink
# use windows compatible paths (case-insensitive)
windowsPaths = true

View File

@ -120,17 +120,21 @@ def cloneFolder(src,dst):
ffile = p(root,file)
lfile = ffile.replace(src + os.path.sep,"",1)
nfile = p(dst,lfile)
if nfile in listLinkedFolders: continue
nnfile = nfile
if config["default"]["windowsPaths"] == "true": nnfile = nnfile.lower()
if nnfile in listLinkedFolders: continue
os.makedirs(nfile)
listLinkedFolders.append(nfile)
listLinkedFolders.append(nnfile)
for file in files:
ffile = p(root,file)
lfile = ffile.replace(src + os.path.sep,"",1)
nfile = p(dst,lfile)
if nfile in listLinked: continue
nnfile = nfile
if config["default"]["windowsPaths"] == "true": nnfile = nnfile.lower()
if nnfile in listLinked: continue
linkFile(ffile,nfile)
listLinked.append(nfile)
listLinked.append(nnfile)
def loadMods():
print("")