diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2018-01-25 18:25:11 +0300 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-12-15 12:57:49 +0300 |
commit | a2bdd5b9a534717fc2c788daee6e92c1df8c4690 (patch) | |
tree | b3279cdb9c83565177a59d7c5627c39e9fe06dff /src/gui/application.cpp | |
parent | b1de184bc8c5afd4b48470e1512fe2544f41e361 (diff) |
Placeholders: Fixup clicking on placeholder after previous change
Now that the name in the db is the name of the placeholder file,
we need to adjust the call to downloadPlaceholder
Diffstat (limited to 'src/gui/application.cpp')
-rw-r--r-- | src/gui/application.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/application.cpp b/src/gui/application.cpp index c0936f3bd..f6d67a4bd 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -684,15 +684,15 @@ void Application::openPlaceholder(const QString &filename) qWarning(lcApplication) << "Can only handle file ending in .owncloud. Unable to open" << filename; return; } - QString normalName = filename.left(filename.size() - placeholderExt.size()); auto folder = FolderMan::instance()->folderForPath(filename); if (!folder) { qWarning(lcApplication) << "Can't find sync folder for" << filename; // TODO: show a QMessageBox for errors return; } - QString relativePath = QDir::cleanPath(normalName).mid(folder->cleanPath().length() + 1); + QString relativePath = QDir::cleanPath(filename).mid(folder->cleanPath().length() + 1); folder->downloadPlaceholder(relativePath); + QString normalName = filename.left(filename.size() - placeholderExt.size()); auto con = QSharedPointer<QMetaObject::Connection>::create(); *con = QObject::connect(folder, &Folder::syncFinished, [con, normalName] { QObject::disconnect(*con); |