Python Desktop Server Weblog 2.3.2003

a picture of myself

Münsterland.org

2003-03-02

Another patch for Windows

Hal Wine found another problem, this time with the transformation of local filenames to URLs. Under windows those pesky backslashes are creeping in. You can read his post or make the following changes to PyDS/UpstreamTool.py lines 882 to 887:
res = self.server.xmlStorageSystem.saveMultipleFiles(
	self.get('prefs','usernum'),
	self.get('prefs','password'),
	map(lambda fn: fn.replace( '\\', '/' ), files),
	map(lambda txt: xmlrpclib.Binary(txt), contents)
)
This should solve the problem and remove backslashes. It does remove them always, regardless of wether you use windows or OS X or Unix, but since backslashes in strings will most definitely pose some problem somewhere, as soon as someone starts to interprete them or use them in command lines, I think it's ok to always throw them out. Nobody who isn't using Windows and is sane in his mind would want to use backslashes in filenames, anayway, right? Winky This patch will be in 0.4.15, of course.
posted at 12:29:04    #
March 2003
MoTuWeThFrSaSu
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      
Feb
2003
 Apr
2003

This is the Python Desktop Server weblog.


(Donations will be used by the author to buy stuff, fullfill selfish wishes or do other silly recreational things. You have been warned.).
The PyDS is
OSI Certified Open Source Software

Python Powered

XML-Image

© 2003-2007, Georg Bauer