-
Notifications
You must be signed in to change notification settings - Fork 11
Store pull files in temp directory #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -413,7 +413,8 @@ def pull_project_async(mc, directory): | |
| # then we just download the whole file | ||
| _pulling_file_with_diffs = lambda f: "diffs" in f and len(f["diffs"]) != 0 | ||
|
|
||
| temp_dir = mp.fpath_meta(f"fetch_{local_version}-{server_version}") | ||
| temp_dir_mergin = os.path.join(tempfile.gettempdir(), f"mergin-{mp.project_id()}") | ||
| temp_dir = os.path.join(temp_dir_mergin, f"fetch_{local_version}-{server_version}") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about using e.g.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good alternative to I think we can manually cleanup temp dir on the finish of pull ( there is qustionable also "unfinish_pull_dir" (where also some pull related staff is stored) and ".cache" dir (which is ok I think).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unfinished pull dir should not be a problem - if there is a failure during pull, we'll create the unfinished pull directory, and ask user to restart qgis and try again (so that some open sqlite connections get closed) - it is not something that's likely to interfere with onedrive etc... |
||
| os.makedirs(temp_dir, exist_ok=True) | ||
| pull_changes = mp.get_pull_changes(server_info["files"]) | ||
| mp.log.debug("pull changes:\n" + pprint.pformat(pull_changes)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.