[Launcher] Set default permissions to 'lib' before updating

This commit is contained in:
Twentysix 2017-01-20 23:51:42 +01:00
parent 9b6804ea09
commit 7eabe70db5

View File

@ -418,7 +418,7 @@ def user_pick_yes_no():
def remove_readonly(func, path, excinfo):
os.chmod(path, stat.S_IWRITE)
os.chmod(path, 0o755)
func(path)
@ -426,12 +426,12 @@ def remove_reqs_readonly():
"""Workaround for issue #569"""
if not os.path.isdir(REQS_DIR):
return
os.chmod(REQS_DIR, stat.S_IWRITE)
os.chmod(REQS_DIR, 0o755)
for root, dirs, files in os.walk(REQS_DIR):
for d in dirs:
os.chmod(os.path.join(root, d), stat.S_IWRITE)
os.chmod(os.path.join(root, d), 0o755)
for f in files:
os.chmod(os.path.join(root, f), stat.S_IWRITE)
os.chmod(os.path.join(root, f), 0o755)
def calculate_md5(filename):