Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-12-07 20:12:45 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-12-15 12:59:22 +0300
commitb667bdda14b5c2322e6ae13a7fa574e5c3a91d6d (patch)
tree084617acd3fac03b6900e6faa14ad6f19f52ddde /src/gui/accountsettings.cpp
parentee8e0fa3322cf677619a4a036370eb6dad3bb3da (diff)
Change EncryptFolderJob path convention
It had a different path convention than all the other jobs, most likely for legacy reasons because of the tight coupling it had to the settings dialog. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/accountsettings.cpp')
-rw-r--r--src/gui/accountsettings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index d5606ec73..6d8618236 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -302,7 +302,12 @@ void AccountSettings::slotMarkSubfolderEncrypted(const FolderStatusModel::SubFol
return;
}
- auto job = new OCC::EncryptFolderJob(accountsState()->account(), folderInfo->_path, folderInfo->_fileId, this);
+ // Folder info have directory paths in Foo/Bar/ convention...
+ Q_ASSERT(!folderInfo->_path.startsWith('/') && folderInfo->_path.endsWith('/'));
+ // But EncryptFolderJob expects directory path Foo/Bar convention
+ const auto path = folderInfo->_path.chopped(1);
+
+ auto job = new OCC::EncryptFolderJob(accountsState()->account(), path, folderInfo->_fileId, this);
connect(job, &OCC::EncryptFolderJob::finished, this, &AccountSettings::slotEncryptFolderFinished);
job->start();
}