Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
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
ops
coco
Commits
4f6e0055
Commit
4f6e0055
authored
Aug 19, 2019
by
Eric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload file failed
parent
06bc2197
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
sftp.py
coco/httpd/elfinder/volumes/sftp.py
+6
-4
No files found.
coco/httpd/elfinder/volumes/sftp.py
View file @
4f6e0055
...
...
@@ -263,10 +263,10 @@ class SFTPVolume(BaseVolume):
num
,
total
=
int
(
num
),
int
(
total
)
if
upload_path
and
len
(
upload_path
)
==
1
and
(
filename
in
upload_path
[
0
]):
path
=
self
.
_join
(
parent_path
,
upload_path
[
0
]
.
lstrip
(
self
.
path_sep
))
elif
upload_path
and
parent
==
upload_path
[
0
]:
path
=
self
.
_join
(
parent_path
,
filename
)
else
:
elif
upload_path
and
parent
!=
upload_path
[
0
]:
path
=
self
.
_join
(
parent_path
,
upload_path
[
0
]
.
lstrip
(
self
.
path_sep
),
filename
)
else
:
path
=
self
.
_join
(
parent_path
,
filename
)
remote_path
=
self
.
_remote_path
(
path
)
if
num
==
0
:
infos
=
self
.
_list
(
os
.
path
.
dirname
(
path
))
...
...
@@ -290,8 +290,10 @@ class SFTPVolume(BaseVolume):
def
upload_chunk_merge
(
self
,
parent
,
chunk
,
upload_path
):
parent_path
=
self
.
_path
(
parent
)
if
len
(
upload_path
)
==
1
and
(
parent
!=
upload_path
[
0
]):
if
upload_path
and
len
(
upload_path
)
==
1
and
(
chunk
in
upload_path
[
0
]):
path
=
self
.
_join
(
parent_path
,
upload_path
[
0
]
.
lstrip
(
self
.
path_sep
))
elif
upload_path
and
(
parent
!=
upload_path
[
0
]):
path
=
self
.
_join
(
parent_path
,
upload_path
[
0
]
.
lstrip
(
self
.
path_sep
),
chunk
)
else
:
path
=
self
.
_join
(
parent_path
,
chunk
)
return
{
"added"
:
[
self
.
_info
(
path
)]}
...
...
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