[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r17335: {updater} Normalize paths to avoid bugging win32 folks with harmless ( (updater/trunk/lib/thandy)



Author: nickm
Date: 2008-11-20 09:17:09 -0500 (Thu, 20 Nov 2008)
New Revision: 17335

Modified:
   updater/trunk/lib/thandy/repository.py
   updater/trunk/lib/thandy/util.py
Log:
Normalize paths to avoid bugging win32 folks with harmless (i believe) slashes.

Modified: updater/trunk/lib/thandy/repository.py
===================================================================
--- updater/trunk/lib/thandy/repository.py	2008-11-20 01:54:43 UTC (rev 17334)
+++ updater/trunk/lib/thandy/repository.py	2008-11-20 14:17:09 UTC (rev 17335)
@@ -195,7 +195,8 @@
         return self._relativePath
 
     def getPath(self):
-        return self._repository.getFilename(self._relativePath)
+        fname = self._repository.getFilename(self._relativePath)
+        return os.path.normpath(fname)
 
     def getExpectedHash(self):
         return self._needHash

Modified: updater/trunk/lib/thandy/util.py
===================================================================
--- updater/trunk/lib/thandy/util.py	2008-11-20 01:54:43 UTC (rev 17334)
+++ updater/trunk/lib/thandy/util.py	2008-11-20 14:17:09 UTC (rev 17335)
@@ -53,7 +53,7 @@
     base = os.path.expanduser(base)
     if not os.path.exists(base):
         os.makedirs(base, 0700)
-    return os.path.join(base, name)
+    return os.path.normpath(os.path.join(base, name))
 
 def ensureParentDir(name):
     """DOCDOC"""