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
1728ab6b
Commit
1728ab6b
authored
Oct 31, 2010
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed an error were mountfs.makedir attempted to remake a mounted path
parent
ccfc728c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
fs/mountfs.py
+5
-0
fs/utils.py
+7
-2
No files found.
fs/mountfs.py
View file @
1728ab6b
...
...
@@ -215,6 +215,11 @@ class MountFS(FS):
fs
,
mount_path
,
delegate_path
=
self
.
_delegate
(
path
)
if
fs
is
self
or
fs
is
None
:
raise
UnsupportedError
(
"make directory"
,
msg
=
"Can only makedir for mounted paths"
)
if
not
delegate_path
:
if
allow_recreate
:
return
else
:
raise
DestinationExistsError
(
path
,
msg
=
"Can not create a directory that already exists (try allow_recreate=True):
%(path)
s"
)
return
fs
.
makedir
(
delegate_path
,
recursive
=
recursive
,
allow_recreate
=
allow_recreate
)
@synchronize
...
...
fs/utils.py
View file @
1728ab6b
...
...
@@ -432,6 +432,11 @@ if __name__ == "__main__":
#browse(m)
from
osfs
import
*
f
=
OSFS
(
'/home/will/projects'
)
print_fs
(
f
)
#f = OSFS('/home/will/projects')
f
=
OSFS
(
'/home/will/tests'
)
from
fs.memoryfs
import
MemoryFS
mem
=
MemoryFS
()
from
fs.utils
import
copydir
copydir
(
f
,
mem
)
print_fs
(
mem
)
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