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:
Pentarctagon 2020-03-08 17:15:09 -05:00 committed by Pentarctagon
parent 0de2070461
commit 0c7b8a5007

View file

@ -47,7 +47,7 @@ with paramiko.Transport(("frs.sourceforge.net", 22)) as transport:
pass
for arg in sys.argv[1:]:
sftp.put(arg, dest+arg)
sftp.put(arg, dest+arg.split("/")[-1])
sha256 = hashlib.sha256()
with open(arg, "rb") as f: