Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
657d5629
Commit
657d5629
authored
Aug 21, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'major-relative-path-fix' into devel
parents
3edbab38
b98348c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
library/files/file
+8
-1
No files found.
library/files/file
View file @
657d5629
...
...
@@ -210,8 +210,15 @@ def main():
module
.
exit_json
(
changed
=
True
)
changed
=
True
curpath
=
''
for
dirname
in
path
.
split
(
'/'
):
# Split the path so we can apply filesystem attributes recursively
# from the root (/) directory for absolute paths or the base path
# of a relative path. We can then walk the appropriate directory
# path to apply attributes.
for
dirname
in
path
.
strip
(
'/'
)
.
split
(
'/'
):
curpath
=
'/'
.
join
([
curpath
,
dirname
])
# Remove leading slash if we're creating a relative path
if
not
os
.
path
.
isabs
(
path
):
curpath
=
curpath
.
lstrip
(
'/'
)
if
not
os
.
path
.
exists
(
curpath
):
os
.
mkdir
(
curpath
)
tmp_file_args
=
file_args
.
copy
()
...
...
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