Add second attempt at auto relink if first fails.

This commit is contained in:
Thomas Wilshaw
2021-07-28 15:15:01 +01:00
parent 332351d1d9
commit 2c2858e0ab
@@ -133,6 +133,12 @@ void FootageRelinkDialog::BrowseForFootage()
QString relative_to_original = original_dir.relativeFilePath(other_footage->filename());
QString absolute_to_new = new_dir.filePath(relative_to_original);
// Second attempt. Try appending the filename to our new filepath
if (!QFileInfo::exists(absolute_to_new)) {
QFileInfo file_info(other_footage->filename());
absolute_to_new = new_dir.filePath(file_info.fileName());
}
// Check if file exists
if (QFileInfo::exists(absolute_to_new)) {
other_footage->set_filename(absolute_to_new);