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
697c8d8f
Commit
697c8d8f
authored
Oct 19, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 复制时有日志
parent
23533bc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
sftp.py
coco/httpd/elfinder/volumes/sftp.py
+1
-1
sftp.py
coco/sftp.py
+7
-1
No files found.
coco/httpd/elfinder/volumes/sftp.py
View file @
697c8d8f
...
...
@@ -197,8 +197,8 @@ class SFTPVolume(BaseVolume):
continue
src_remote_path
=
self
.
_remote_path
(
src_path
)
dest_remote_path
=
self
.
_remote_path
(
dest_path
)
f
=
self
.
sftp
.
open
(
src_remote_path
,
mode
=
'r'
)
try
:
f
=
self
.
sftp
.
open
(
src_remote_path
,
mode
=
'r'
)
attr
=
self
.
sftp
.
putfo
(
f
,
dest_remote_path
)
if
cut
:
removed
.
append
(
self
.
remove
(
target
))
...
...
coco/sftp.py
View file @
697c8d8f
...
...
@@ -426,7 +426,13 @@ class InternalSFTPClient(SFTPServer):
def
putfo
(
self
,
f
,
path
,
callback
=
None
,
confirm
=
True
):
client
,
rpath
=
self
.
get_sftp_client_rpath
(
path
)
return
client
.
putfo
(
f
,
rpath
,
callback
=
callback
,
confirm
=
confirm
)
success
=
False
try
:
attr
=
client
.
putfo
(
f
,
rpath
,
callback
=
callback
,
confirm
=
confirm
)
success
=
True
return
attr
finally
:
self
.
create_ftp_log
(
path
,
'Upload'
,
success
)
def
close
(
self
):
return
self
.
session_ended
()
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