diff options
author | Klaas Freitag <freitag@owncloud.com> | 2014-06-16 15:34:59 +0400 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2014-06-16 15:34:59 +0400 |
commit | 1230e8733061ee0f3556f29cd93969e4bf50b872 (patch) | |
tree | 24189318583d77b83ab58054511b642b39c2d523 /src/mirall/propagator_qnam.cpp | |
parent | b2966fecc7a610ea4df81cd9eaed4bf234c5587a (diff) |
Propagator: Give a more specific error message on file remove.
If the file is removed during it is synced up, there is now a correct
error message saying that, rather than "the file has changed during
upload."
Diffstat (limited to 'src/mirall/propagator_qnam.cpp')
-rw-r--r-- | src/mirall/propagator_qnam.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp index 5403a33a1..f869e30e6 100644 --- a/src/mirall/propagator_qnam.cpp +++ b/src/mirall/propagator_qnam.cpp @@ -270,9 +270,14 @@ void PropagateUploadFileQNAM::slotPutFinished() bool finished = job->reply()->hasRawHeader("ETag"); if (!finished) { + QFileInfo fi(_propagator->_localDir + _item._file); + if( !fi.exists() ) { + _propagator->_activeJobs--; + done(SyncFileItem::SoftError, tr("The local file was removed during sync.")); + return; + } - if (Utility::qDateTimeToTime_t(QFileInfo(_propagator->_localDir + _item._file).lastModified()) - != _item._modtime) { + if (Utility::qDateTimeToTime_t(fi.lastModified()) != _item._modtime) { /* Uh oh: The local file has changed during upload */ _propagator->_activeJobs--; done(SyncFileItem::SoftError, tr("Local file changed during sync.")); |