equal
deleted
inserted
replaced
406 if copied: |
406 if copied: |
407 st = os.stat(src) |
407 st = os.stat(src) |
408 # Persist executable bit (apply it to group and other if user |
408 # Persist executable bit (apply it to group and other if user |
409 # has it) |
409 # has it) |
410 if st[stat.ST_MODE] & stat.S_IXUSR: |
410 if st[stat.ST_MODE] & stat.S_IXUSR: |
411 setmode = 0755 |
411 setmode = int('0755', 8) |
412 else: |
412 else: |
413 setmode = 0644 |
413 setmode = int('0644', 8) |
414 os.chmod(dst, (stat.S_IMODE(st[stat.ST_MODE]) & ~0777) | |
414 m = stat.S_IMODE(st[stat.ST_MODE]) |
415 setmode) |
415 m = (m & ~int('0777', 8)) | setmode |
|
416 os.chmod(dst, m) |
416 file_util.copy_file = copyfileandsetmode |
417 file_util.copy_file = copyfileandsetmode |
417 try: |
418 try: |
418 install_lib.run(self) |
419 install_lib.run(self) |
419 finally: |
420 finally: |
420 file_util.copy_file = realcopyfile |
421 file_util.copy_file = realcopyfile |