Fix SFTP handling of files not in the directory the SFTP scripts is called from.
This is meant for moving single files to a single remote directory. Handling anything more complex is not meant to be supported, and currently doesn't work anyway.
This commit is contained in:
parent
0de2070461
commit
0c7b8a5007
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ with paramiko.Transport(("frs.sourceforge.net", 22)) as transport:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
for arg in sys.argv[1:]:
|
for arg in sys.argv[1:]:
|
||||||
sftp.put(arg, dest+arg)
|
sftp.put(arg, dest+arg.split("/")[-1])
|
||||||
|
|
||||||
sha256 = hashlib.sha256()
|
sha256 = hashlib.sha256()
|
||||||
with open(arg, "rb") as f:
|
with open(arg, "rb") as f:
|
||||||
|
|
Loading…
Add table
Reference in a new issue