Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
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
pyfs
Commits
51f6d006
Commit
51f6d006
authored
Sep 16, 2008
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a thread lock to makedir
parent
1fd5453a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
fs/zipfs.py
+10
-6
No files found.
fs/zipfs.py
View file @
51f6d006
...
@@ -172,12 +172,16 @@ class ZipFS(FS):
...
@@ -172,12 +172,16 @@ class ZipFS(FS):
return
self
.
_path_fs
.
exists
(
path
)
return
self
.
_path_fs
.
exists
(
path
)
def
makedir
(
self
,
dirname
,
mode
=
0777
,
recursive
=
False
,
allow_recreate
=
False
):
def
makedir
(
self
,
dirname
,
mode
=
0777
,
recursive
=
False
,
allow_recreate
=
False
):
dirname
=
normpath
(
dirname
)
self
.
_lock
.
acquire
()
if
self
.
zip_mode
not
in
"wa"
:
try
:
raise
OperationFailedError
(
"MAKEDIR_FAILED"
,
dirname
,
"Zip file must be opened for writing ('w') or appending ('a')"
)
dirname
=
normpath
(
dirname
)
if
not
dirname
.
endswith
(
'/'
):
if
self
.
zip_mode
not
in
"wa"
:
dirname
+=
'/'
raise
OperationFailedError
(
"MAKEDIR_FAILED"
,
dirname
,
"Zip file must be opened for writing ('w') or appending ('a')"
)
self
.
_add_resource
(
dirname
)
if
not
dirname
.
endswith
(
'/'
):
dirname
+=
'/'
self
.
_add_resource
(
dirname
)
finally
:
self
.
_lock
.
release
()
def
listdir
(
self
,
path
=
"/"
,
wildcard
=
None
,
full
=
False
,
absolute
=
False
,
hidden
=
False
,
dirs_only
=
False
,
files_only
=
False
):
def
listdir
(
self
,
path
=
"/"
,
wildcard
=
None
,
full
=
False
,
absolute
=
False
,
hidden
=
False
,
dirs_only
=
False
,
files_only
=
False
):
...
...
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