diff options
Diffstat (limited to 'api/logic')
-rw-r--r-- | api/logic/FolderInstanceProvider.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/api/logic/FolderInstanceProvider.cpp b/api/logic/FolderInstanceProvider.cpp index ea0d4ef0..88b5bdc6 100644 --- a/api/logic/FolderInstanceProvider.cpp +++ b/api/logic/FolderInstanceProvider.cpp @@ -327,17 +327,14 @@ QString FolderInstanceProvider::getStagedInstancePath() bool FolderInstanceProvider::commitStagedInstance(const QString& keyPath, const QString& path, const QString& instanceName, const QString& groupName) { - if(!path.contains(keyPath)) - { - qWarning() << "It is not possible to commit" << path << "because it is not in" << keyPath; - return false; - } QDir dir; QString instID = FS::DirNameFromString(instanceName, m_instDir); { WatchLock lock(m_watcher, m_instDir); - if(!dir.rename(path, FS::PathCombine(m_instDir, instID))) + QString destination = FS::PathCombine(m_instDir, instID); + if(!dir.rename(path, destination)) { + qWarning() << "Failed to move" << path << "to" << destination; destroyStagingPath(keyPath); return false; } |