Skip to content

Commit a97920a

Browse files
author
PachKosti
committed
code cleaning
1 parent 1cb3051 commit a97920a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mergin/client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,11 +1027,8 @@ def _download_file(self, project_path, file, directory, parallel=True, diff_only
10271027
basename = os.path.basename(file['diff']['path']) if diff_only else os.path.basename(file['path'])
10281028

10291029
if file['size'] == 0:
1030-
directory = os.path.abspath(file_dir)
1031-
os.makedirs(directory, exist_ok=True)
1032-
print(os.path.join(file_dir, basename))
1033-
with open(os.path.join(file_dir, basename), 'w'):
1034-
pass
1030+
os.makedirs(file_dir, exist_ok=True)
1031+
open(os.path.join(file_dir, basename), 'w').close()
10351032
return file["path"]
10361033

10371034
def download_file_part(part):

0 commit comments

Comments
 (0)