index : logbot | |
Archlinux32 log bot | gitolite user |
summaryrefslogtreecommitdiff |
author | Chris Oliver <excid3@gmail.com> | 2012-01-19 13:22:38 -0600 |
---|---|---|
committer | Chris Oliver <excid3@gmail.com> | 2012-01-19 13:22:38 -0600 |
commit | 829de89d1f5ba987a153739e5eeaa3e27110e5d8 (patch) | |
tree | d6cb0a77176006d69e604b492b1deec8bb92f842 | |
parent | a7f48ea6cc2f13450fe58db008ad4b3cbd5deb4e (diff) |
-rw-r--r-- | logbot.py | 7 |
@@ -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: |