Comparar commits

...

2 Commits

Autor SHA1 Mensagem Data
Markus Goetz 5cabac73ad WiP: Download debug info about mtimes 2017-01-05 12:46:32 +01:00
Gerhard Wiesinger 4900db0099 Hopefully fixed issue #5375: [NTFS on a VeraCrypt Volume] Windows clients play ping-pong forever 2017-01-03 17:28:35 +01:00
+10
Ver Arquivo
@@ -739,10 +739,12 @@ void PropagateDownloadFile::downloadFinished()
qDebug() << "Created conflict file" << fn << "->" << conflictFileName;
}
qDebug() << "1 We need to fetch the time again" << _item->_modtime;
FileSystem::setModTime(_tmpFile.fileName(), _item->_modtime);
// We need to fetch the time again because some file systems such as FAT have worse than a second
// Accuracy, and we really need the time from the file system. (#3103)
_item->_modtime = FileSystem::getModTime(_tmpFile.fileName());
qDebug() << "2 and we really need the time from the file system" << _item->_modtime;
if (FileSystem::fileExists(fn)) {
// Preserve the existing file permissions.
@@ -805,6 +807,14 @@ void PropagateDownloadFile::downloadFinished()
}
FileSystem::setFileHidden(fn, false);
qDebug() << "1 Set modification time of moved file again" << _item->_modtime;
// Set modification time of moved file again (because we modified permissions above and that changes modification time, depending on filesystem)
FileSystem::setModTime(fn, _item->_modtime);
// We need to fetch the time again because some file systems such as FAT have worse than a second
// Accuracy, and we really need the time from the file system. (#3103)
_item->_modtime = FileSystem::getModTime(fn);
qDebug() << "2 and we really need the time from the file system" << _item->_modtime;
// Maybe we downloaded a newer version of the file than we thought we would...
// Get up to date information for the journal.
_item->_size = FileSystem::getSize(fn);