Skip to content

Commit

Permalink
sync: don't delete not yet uploaded files
Browse files Browse the repository at this point in the history
from cloud service, fixies giowck#128
  • Loading branch information
joshirio committed Feb 20, 2020
1 parent d4b2448 commit 2cf0f5c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/filemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,13 @@ void FileManager::addFileToUploadList(const QString &file)

void FileManager::addFileToDeleteList(const QString &file)
{
QStringList list = fileListToRemove();
if (!list.contains(file)) {
list.append(file);
m_settingsManager->saveToDeleteList(list);
QStringList toUploadList = fileListToUpload();
if (!toUploadList.contains(file)) { //check and avoid if file has yet to be uploaded
QStringList list = fileListToRemove();
if (!list.contains(file)) {
list.append(file);
m_settingsManager->saveToDeleteList(list);
}
}

//set local data changed
Expand Down

0 comments on commit 2cf0f5c

Please sign in to comment.