Skip to content

Commit

Permalink
NXDRIVE-521: Unset readonly flag on copied file for Drive Edit purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
ataillefer committed Jan 12, 2016
1 parent 88b5aa2 commit 4dc8fae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nuxeo-drive-client/nxdrive/drive_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def _download_content(self, engine, remote_client, info, file_path, url=None):
existing_file_path = local_client._abspath(pair.local_path)
log.debug('Local file matches remote digest %r, copying it from %r', info.digest, existing_file_path)
shutil.copy(existing_file_path, file_out)
if pair.is_readonly():
log.debug('Unsetting readonly flag on copied file %r', file_out)
from nxdrive.client.common import BaseClient
BaseClient.unset_path_readonly(file_out)
else:
log.debug('Downloading file %r', info.filename)
if url is not None:
Expand Down

0 comments on commit 4dc8fae

Please sign in to comment.