Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Oliver <excid3@gmail.com>2012-01-19 13:22:38 -0600
committerChris Oliver <excid3@gmail.com>2012-01-19 13:22:38 -0600
commit829de89d1f5ba987a153739e5eeaa3e27110e5d8 (patch)
treed6cb0a77176006d69e604b492b1deec8bb92f842
parenta7f48ea6cc2f13450fe58db008ad4b3cbd5deb4e (diff)
Split filenames on windows
-rw-r--r--logbot.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/logbot.py b/logbot.py
index 0b9eb8e..8cc23b6 100644
--- a/logbot.py
+++ b/logbot.py
@@ -34,6 +34,7 @@ __license__ = "GPL2"
import cgi
import os
import ftplib
+import sys
from time import strftime
try:
@@ -205,8 +206,12 @@ class Logbot(SingleServerIRCBot):
for fname in files:
full_fname = os.path.join(root, fname)
- remote_fname = "/".join(os.path.split(full_fname)[1:])
+ if sys.platform == 'win32':
+ remote_fname = "/".join(full_fname.split("\\")[1:])
+ else:
+ remote_fname = "/".join(full_fname.split("/")[1:])
if DEBUG: print repr(remote_fname)
+
try:
self.ftp.storbinary("STOR %s" % remote_fname, open(full_fname, "rb"))
except ftplib.error_perm, e: