Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos.buildout
Commits
0c40f00c
Commit
0c40f00c
authored
Sep 09, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
call chmod() for directory too and ignore symlinks.
parent
1e67d300
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
easy_install.py
src/zc/buildout/easy_install.py
+6
-3
No files found.
src/zc/buildout/easy_install.py
View file @
0c40f00c
...
...
@@ -2080,20 +2080,23 @@ def _final_version(parsed_version):
return
False
return
True
def
chmod
(
filepath
):
def
chmod
(
path
):
if
os
.
path
.
islink
(
path
):
return
# give the same permission but write as owner to group and other.
current_perm
=
os
.
stat
(
file
path
)
.
st_mode
&
\
current_perm
=
os
.
stat
(
path
)
.
st_mode
&
\
(
stat
.
S_IRWXU
+
stat
.
S_IRWXG
+
stat
.
S_IRWXO
)
owner_perm
=
current_perm
&
stat
.
S_IRWXU
new_perm
=
(
owner_perm
+
owner_perm
/
0o010
+
owner_perm
/
0o100
)
&
\
(
~
0o022
)
if
new_perm
!=
current_perm
:
os
.
chmod
(
file
path
,
new_perm
)
os
.
chmod
(
path
,
new_perm
)
def
redo_pyc
(
egg
):
if
not
os
.
path
.
isdir
(
egg
):
return
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
egg
):
chmod
(
dirpath
)
for
filename
in
filenames
:
filepath
=
os
.
path
.
join
(
dirpath
,
filename
)
chmod
(
filepath
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment