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
9389c458
Commit
9389c458
authored
Dec 31, 2010
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for fsmount issue
parent
acd246f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
fs/commands/fsmount.py
+10
-8
No files found.
fs/commands/fsmount.py
View file @
9389c458
...
@@ -46,7 +46,7 @@ Mounts a file system on a system path"""
...
@@ -46,7 +46,7 @@ Mounts a file system on a system path"""
try
:
try
:
mount_path
=
args
[
0
][:
1
]
mount_path
=
args
[
0
][:
1
]
except
IndexError
:
except
IndexError
:
self
.
error
(
'Driver letter
\n
'
)
self
.
error
(
'Driver letter
required
\n
'
)
return
1
return
1
from
fs.expose
import
dokan
from
fs.expose
import
dokan
...
@@ -59,7 +59,7 @@ Mounts a file system on a system path"""
...
@@ -59,7 +59,7 @@ Mounts a file system on a system path"""
try
:
try
:
mount_path
=
args
[
0
]
mount_path
=
args
[
0
]
except
IndexError
:
except
IndexError
:
self
.
error
(
'Mount path required
\n
'
)
self
.
error
(
self
.
usage
+
'
\n
'
)
return
1
return
1
from
fs.expose
import
fuse
from
fs.expose
import
fuse
...
@@ -70,7 +70,7 @@ Mounts a file system on a system path"""
...
@@ -70,7 +70,7 @@ Mounts a file system on a system path"""
try
:
try
:
fs_url
=
args
[
0
]
fs_url
=
args
[
0
]
except
IndexError
:
except
IndexError
:
self
.
error
(
'FS path required
\n
'
)
self
.
error
(
self
.
usage
+
'
\n
'
)
return
1
return
1
try
:
try
:
...
@@ -78,9 +78,9 @@ Mounts a file system on a system path"""
...
@@ -78,9 +78,9 @@ Mounts a file system on a system path"""
except
IndexError
:
except
IndexError
:
if
windows
:
if
windows
:
mount_path
=
mount_path
[:
1
]
.
upper
()
mount_path
=
mount_path
[:
1
]
.
upper
()
self
.
error
(
'Drive letter required
'
)
self
.
error
(
self
.
usage
+
'
\n
'
)
else
:
else
:
self
.
error
(
'Mount path required
\n
'
)
self
.
error
(
self
.
usage
+
'
\n
'
)
return
1
return
1
fs
,
path
=
self
.
open_fs
(
fs_url
,
create_dir
=
True
)
fs
,
path
=
self
.
open_fs
(
fs_url
,
create_dir
=
True
)
...
@@ -113,9 +113,11 @@ Mounts a file system on a system path"""
...
@@ -113,9 +113,11 @@ Mounts a file system on a system path"""
volname
=
str
(
fs
))
volname
=
str
(
fs
))
else
:
else
:
if
not
os
.
path
.
exists
(
mount_path
):
if
not
os
.
path
.
exists
(
mount_path
):
try
:
os
.
makedirs
(
mount_path
)
os
.
makedirs
(
mount_path
)
except
:
pass
from
fs.expose
import
fuse
from
fs.expose
import
fuse
self
.
output
(
"Mounting
%
s on
%
s
\n
"
%
(
fs
,
mount_path
),
True
)
self
.
output
(
"Mounting
%
s on
%
s
\n
"
%
(
fs
,
mount_path
),
True
)
...
@@ -129,8 +131,8 @@ Mounts a file system on a system path"""
...
@@ -129,8 +131,8 @@ Mounts a file system on a system path"""
mp
=
fuse
.
mount
(
fs
,
mp
=
fuse
.
mount
(
fs
,
mount_path
,
mount_path
,
foreground
=
True
)
foreground
=
True
)
else
:
fs
.
close
=
lambda
:
None
def
run
():
def
run
():
return
FSMount
()
.
run
()
return
FSMount
()
.
run
()
...
...
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