From a7f48ea6cc2f13450fe58db008ad4b3cbd5deb4e Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Thu, 19 Jan 2012 13:18:10 -0600 Subject: Use python path splitting to allow windows filename parsing --- logbot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'logbot.py') diff --git a/logbot.py b/logbot.py index 5af885a..0b9eb8e 100644 --- a/logbot.py +++ b/logbot.py @@ -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: -- cgit v1.2.3