Skip to content

Commit

Permalink
Use . noation for ProjectFile class instead dict getter
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelGeo committed Oct 30, 2024
1 parent 775b7b3 commit 52cd457
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/mergin/sync/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ def download(project_name, version, directory): # pylint: disable=W0612
os.mkdir(directory)
files = pv.files
for f in files:
project.storage.restore_versioned_file(f["path"], version)
f_dir = os.path.dirname(f["path"])
project.storage.restore_versioned_file(f.path, version)
f_dir = os.path.dirname(f.path)
if f_dir:
os.makedirs(os.path.join(directory, f_dir), exist_ok=True)
shutil.copy(
os.path.join(project.storage.project_dir, f["location"]),
os.path.join(directory, f["path"]),
os.path.join(project.storage.project_dir, f.location),
os.path.join(directory, f.path),
)
print("Project downloaded successfully")

Expand Down

0 comments on commit 52cd457

Please sign in to comment.