mirror of
https://github.com/grassmunk/Chicago95.git
synced 2025-07-31 01:24:36 +02:00
Fixed symlinks in installer
This commit is contained in:
parent
b5133ae6c3
commit
48be4ebd98
21
installer.py
21
installer.py
@ -377,14 +377,21 @@ class InstallGUI:
|
|||||||
|
|
||||||
def get_files(self, from_folder, target_folder, target):
|
def get_files(self, from_folder, target_folder, target):
|
||||||
theme_files = {}
|
theme_files = {}
|
||||||
for root, dirs, files in os.walk(from_folder, topdown=False):
|
for root, dirs, files in os.walk(from_folder):
|
||||||
|
|
||||||
|
if root[-1] != "/":
|
||||||
|
root = root + "/"
|
||||||
|
|
||||||
|
loc = root.find(target)
|
||||||
|
to_dir = root[loc+len(target):]
|
||||||
|
|
||||||
|
for folder in dirs:
|
||||||
|
if os.path.islink(os.path.join(root,folder)):
|
||||||
|
from_file = "{}{}".format(root, folder)
|
||||||
|
to_file = "{}{}{}".format(target_folder,to_dir, folder)
|
||||||
|
theme_files[from_file] = to_file
|
||||||
|
|
||||||
for name in files:
|
for name in files:
|
||||||
if root[-1] != "/":
|
|
||||||
root = root + "/"
|
|
||||||
|
|
||||||
loc = root.find(target)
|
|
||||||
to_dir = root[loc+len(target):]
|
|
||||||
|
|
||||||
from_file = "{}{}".format(root, name)
|
from_file = "{}{}".format(root, name)
|
||||||
to_file = "{}{}{}".format(target_folder,to_dir, name)
|
to_file = "{}{}{}".format(target_folder,to_dir, name)
|
||||||
theme_files[from_file] = to_file
|
theme_files[from_file] = to_file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user