diff framework/Align.cpp @ 716:604393795ee5

If no local filename (e.g. when decoded to memory), get the local filename from the file source (e.g. cached version of encoded file)
author Chris Cannam
date Tue, 29 Oct 2019 12:47:44 +0000
parents 162c3f4b870c
children d2e8e9788cd4
line wrap: on
line diff
--- a/framework/Align.cpp	Thu Oct 17 11:13:11 2019 +0100
+++ b/framework/Align.cpp	Tue Oct 29 12:47:44 2019 +0000
@@ -505,7 +505,14 @@
     }
     
     QString refPath = reference->getLocalFilename();
+    if (refPath == "") {
+        refPath = FileSource(reference->getLocation()).getLocalFilename();
+    }
+    
     QString otherPath = other->getLocalFilename();
+    if (otherPath == "") {
+        otherPath = FileSource(other->getLocation()).getLocalFilename();
+    }
 
     if (refPath == "" || otherPath == "") {
         error = "Failed to find local filepath for wave-file model";