mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-17 18:01:06 +03:00
@@ -24,7 +24,7 @@ def normalize(path: str) -> str:
|
|||||||
|
|
||||||
def generate_md5_table(folder: str, level, exclude: str = None) -> dict:
|
def generate_md5_table(folder: str, level, exclude: str = None) -> dict:
|
||||||
res: dict = dict()
|
res: dict = dict()
|
||||||
skip = normalize(os.path.abspath(exclude)) if exclude else None
|
skip = normalize(exclude) if exclude else None
|
||||||
excluded = False
|
excluded = False
|
||||||
# os.curdir is the literal ".", so restoring it left us inside `folder`.
|
# os.curdir is the literal ".", so restoring it left us inside `folder`.
|
||||||
curdir = os.getcwd()
|
curdir = os.getcwd()
|
||||||
@@ -34,7 +34,7 @@ def generate_md5_table(folder: str, level, exclude: str = None) -> dict:
|
|||||||
for f in files:
|
for f in files:
|
||||||
md5_generator = md5()
|
md5_generator = md5()
|
||||||
full_path = os.path.join(root, f)
|
full_path = os.path.join(root, f)
|
||||||
if skip and normalize(os.path.abspath(full_path)) == skip:
|
if skip and normalize(full_path) == skip:
|
||||||
print(f"Excluding {full_path}...")
|
print(f"Excluding {full_path}...")
|
||||||
excluded = True
|
excluded = True
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user