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
9f7b0bcb
Commit
9f7b0bcb
authored
Sep 17, 2012
by
btimby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to override isfile() and isdir() anymore, getinfo() is correct.
parent
9e90d216
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
+0
-22
fs/contrib/archivefs.py
+0
-22
No files found.
fs/contrib/archivefs.py
View file @
9f7b0bcb
...
...
@@ -267,28 +267,6 @@ class ArchiveMountFS(mountfs.MountFS):
return
info
return
super
(
ArchiveMountFS
,
self
)
.
getinfo
(
path
)
def
isdir
(
self
,
path
):
"""An isdir() override that allows archives to masquerade as directories. If
the path is not an archive, the call is delegated. In the event that the path
is an archive, that archive is mounted to ensure it can actually be treated
like a directory."""
fs
,
_mount_path
,
delegate_path
=
self
.
_delegate
(
path
)
if
isinstance
(
fs
,
ArchiveFS
)
and
path
==
_mount_path
:
# If the path is an archive mount point, it is a directory.
return
True
return
super
(
ArchiveMountFS
,
self
)
.
isdir
(
path
)
def
isfile
(
self
,
path
):
"""An isfile() override that checks if the given path is a file or not. It is
not fooled by a mounted archive. If the path is not an archive, the call is
delegated."""
fs
,
_mount_path
,
delegate_path
=
self
.
_delegate
(
path
,
auto_mount
=
False
)
if
isinstance
(
fs
,
ArchiveFS
)
and
path
==
_mount_path
:
# If the path is an archive mount point, it is a file.
return
True
else
:
return
fs
.
isfile
(
delegate_path
)
def
getsize
(
self
,
path
):
"""A getsize() override that returns the size of an archive. It is not fooled by
a mounted archive. If the path is not an archive, the call is delegated."""
...
...
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