Use python path splitting to allow windows filename parsing

This commit is contained in:
Chris Oliver 2012-01-19 13:18:10 -06:00
parent 1700265b18
commit a7f48ea6cc

View file

@ -205,9 +205,8 @@ class Logbot(SingleServerIRCBot):
for fname in files:
full_fname = os.path.join(root, fname)
remote_fname = "/".join(full_fname.split("/")[1:])
remote_fname = "/".join(os.path.split(full_fname)[1:])
if DEBUG: print repr(remote_fname)
if not remote_fname: continue
try:
self.ftp.storbinary("STOR %s" % remote_fname, open(full_fname, "rb"))
except ftplib.error_perm, e: