[game-data-packager] 01/25: don't tag all files coming from cdrom as executable
Simon McVittie
smcv at debian.org
Wed Feb 4 10:01:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 90f2d229035246c67d57dddbd71652b5717ee747
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon Jan 26 14:20:39 2015 +0100
don't tag all files coming from cdrom as executable
this still handle hipnotic-tryexec.sh as expected
---
game_data_packager/__init__.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 4c9e2ed..0ea8485 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1638,9 +1638,12 @@ class GameData(object):
stat_res = os.lstat(full)
if stat.S_ISLNK(stat_res.st_mode):
continue
- elif (stat.S_ISDIR(stat_res.st_mode) or
- (stat.S_IMODE(stat_res.st_mode) & 0o111) != 0):
- # make directories and executable files rwxr-xr-x
+ elif stat.S_ISDIR(stat_res.st_mode):
+ # make directories rwxr-xr-x
+ os.chmod(full, 0o755)
+ elif ((stat.S_IMODE(stat_res.st_mode) & 0o111) != 0
+ and fn.endswith('.sh')):
+ # make executable files rwxr-xr-x
os.chmod(full, 0o755)
else:
# make other files rw-r--r--
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list