Browse Source

Remove files w/ filesize 0 (failed upl0ads) prior to upl0adin ;];];;]]]];];

Wazakindjes 3 years ago
parent
commit
cc745cc501
1 changed files with 1 additions and 0 deletions
  1. 1 0
      hurr.py

+ 1 - 0
hurr.py

@@ -168,6 +168,7 @@ def upload(local, remote):
 	growlnotif(0)
 	try:
 		SSH.connect(MUHCONF['server'], username=MUHCONF['joeser'], key_filename="%s/%s" % (MUHCONF['sshdir'], MUHCONF['sshkey']));
+		SSH.exec_command('find %s -type f -size 0 -exec rm "{}" \;' % MUHCONF['remotebase'])
 		sftp = SSH.open_sftp()
 		sftp.put(local, '%s/%s' % (MUHCONF['remotebase'], remote))
 		sftp.close()