Skip to content
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

Recovery fixes #2311

Merged
merged 3 commits into from
Nov 3, 2018
Merged

Recovery fixes #2311

merged 3 commits into from
Nov 3, 2018

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Nov 2, 2018

A missing variable update in the recovery code (#2275) caused it to mistakenly flag bad relative path expansions as successfully "recovered" paths, breaking recovery on project-file move. This change updates the project data with the newly-recovered path.

(Ugh, sorry, ignore the header changes that came with this, that's just GitHub's Atom editor being too-helpful. It doesn't like the single space characters on those otherwise blank lines. The only substantive change here is this:

@@ -915,15 +915,17 @@ class ProjectDataStore(JsonDataStore, UpdateInterface):
 
             log.info("checking file %s" % path)
             while not os.path.exists(path) and "%" not in path:
-                # File already exists! Prompt user to find missing file
-                # try to find clip with previous starting folder:
+                # File already exists!
+                # try to find file with previous starting folder:
                 if starting_folder and os.path.exists(os.path.join(starting_folder, file_name_with_ext)):
-                    # Update clip path
+                    # Update file path
+                    path = os.path.join(starting_folder, file_name_with_ext)
                     file["path"] = path
                     get_app().updates.update(["import_path"], os.path.dirname(path))
-                    log.info("Auto-updated missing file: %s" % file["path"])
+                    log.info("Auto-updated missing file: %s" % path)
                     break
                 else:
+                    # Prompt user to find missing file
                     QMessageBox.warning(None, _("Missing File (%s)") % file["id"], _("%s cannot be found.") % file_name_with_ext)

A missing variable update in the recovery code caused it to mistakenly 
flag bad relative path expansions as successfully "recovered" paths, 
breaking recovery on project-file move. This change updates the project 
data with the newly-recovered path.
@DylanC DylanC merged commit 12ec5f0 into OpenShot:develop Nov 3, 2018
@ferdnyc ferdnyc deleted the recovery-fixes branch November 3, 2018 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants