aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-06-06 21:42:44 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-06-06 21:42:44 +0200
commit28b3cc7b5141fcc2fed84433b9fe9851c35b7e08 (patch)
tree13e8ce379a215eb277e8e99119fd61d19f408c59
parenta3e6a47fc78ff1276e31313a246025c0756c8ed0 (diff)
Fix autosave not working when opening project file from command line or click in file browser
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7e18316..06b73bf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -113,6 +113,10 @@ int main(int argc, char *argv[])
QUrl url;
if (parser.positionalArguments().count()) {
url = QUrl::fromLocalFile(parser.positionalArguments().first());
+ // Make sure we get an absolute URL so that we can autosave correctly
+ QString currentPath = QDir::currentPath();
+ QUrl startup = QUrl::fromLocalFile(currentPath.endsWith(QDir::separator()) ? currentPath : currentPath + QDir::separator());
+ url = startup.resolved(url);
}
window = new MainWindow(mltPath, url, clipsToLoad);
window->show();