Skip to content

Commit 357d460

Browse files
author
Matthias Putz
committed
Portable: dont protect file after copying on Windows
1 parent 9ae7826 commit 357d460

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

portable.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,8 @@ def prepare_editor_args(editor):
285285
args = editor.rsplit()
286286
shell = False
287287
return (args, shell)
288+
289+
290+
def os_chmod(dest, mode):
291+
if isUnix():
292+
os.chmod(dest, mode)

project.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ def _Copy(self):
233233
# make the file read-only
234234
mode = os.stat(dest)[stat.ST_MODE]
235235
mode = mode & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
236-
os.chmod(dest, mode)
236+
# os.chmod(dest, mode)
237+
portable.os_chmod(dest, mode)
237238
except IOError:
238239
_error('Cannot copy file %s to %s', src, dest)
239240

0 commit comments

Comments
 (0)