Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Webterminal
Commits
11a365e9
Commit
11a365e9
authored
6 years ago
by
jimmy201602
Browse files
Options
Download
Email Patches
Plain Diff
fix sftp protocol link not exist bug
parent
1886b6ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
elfinder/sftpstoragedriver/sftpstorage.py
+0
-1
elfinder/sftpstoragedriver/sftpstorage.py
elfinder/volumes/storage.py
+7
-1
elfinder/volumes/storage.py
with
7 additions
and
2 deletions
+7
-2
elfinder/sftpstoragedriver/sftpstorage.py
+
0
-
1
View file @
11a365e9
...
...
@@ -231,7 +231,6 @@ class SFTPStorageFile(File):
if
not
self
.
_is_read
:
self
.
file
=
self
.
_storage
.
_read
(
self
.
_name
)
self
.
_is_read
=
True
return
self
.
file
.
read
(
num_bytes
)
def
write
(
self
,
content
):
...
...
This diff is collapsed.
Click to expand it.
elfinder/volumes/storage.py
+
7
-
1
View file @
11a365e9
...
...
@@ -223,8 +223,14 @@ class ElfinderVolumeStorage(ElfinderVolumeDriver):
"""
stat
=
{}
# fix sftp link not exist can not open bug
if
not
self
.
_options
[
'storage'
].
exists
(
path
):
raise
os
.
error
stat
[
'size'
]
=
'unknown'
stat
[
'mime'
]
=
'symlink-broken'
stat
[
'read'
]
=
False
stat
[
'write'
]
=
False
return
stat
# raise os.error
try
:
stat
[
'mime'
]
=
self
.
mimetype
(
path
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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