mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Don't make files read-only when server is too old #4450
This commit is contained in:
parent
3f462403a9
commit
a9b00a7489
1 changed files with 7 additions and 2 deletions
|
@ -691,8 +691,13 @@ void PropagateDownloadFileQNAM::downloadFinished()
|
|||
}
|
||||
|
||||
// Apply the remote permissions
|
||||
FileSystem::setFileReadOnlyWeak(_tmpFile.fileName(),
|
||||
!_item->_remotePerm.contains('W'));
|
||||
// Older server versions sometimes provide empty remote permissions
|
||||
// see #4450 - don't adjust the write permissions there.
|
||||
const int serverVersionGoodRemotePerm = 0x070000; // 7.0.0
|
||||
if (_propagator->account()->serverVersionInt() >= serverVersionGoodRemotePerm) {
|
||||
FileSystem::setFileReadOnlyWeak(_tmpFile.fileName(),
|
||||
!_item->_remotePerm.contains('W'));
|
||||
}
|
||||
|
||||
QString error;
|
||||
_propagator->addTouchedFile(fn);
|
||||
|
|
Loading…
Reference in a new issue