On Tuesday, 24. October 2006 21:54, Jason Tackaberry wrote: > On Tue, 2006-10-24 at 20:56 +0200, Dirk Meyer wrote: > > if 'dirname' in query: > > query['dirname'] = os.path.realpath(query['dirname'] + '/') > > + if query['dirname'] == '//': > > + query['dirname'] = '/' > > I don't think concatenating '/' has any purpose -- os.path.realpath() is > just going to remove the trailing slash anyway. > > Actually os.path.realpath('//') == '//' and this looks like a bug to me, > especially given that realpath('///') == '/'
Strange, I thought normpath would do that, but "//" at the beginning is really a special case: In [1]: os.path.normpath("//") Out[1]: '//' In [2]: os.path.normpath("/foo//bar/") Out[2]: '/foo/bar' In [3]: os.path.normpath("///foo//bar///baz/") Out[3]: '/foo/bar/baz' In [4]: os.path.normpath("//foo//bar///baz/") Out[4]: '//foo/bar/baz' I wonder if that has something to do with URIs, but anyways, it really looks like a bug (this is Python 2.3.4 BTW). Ciao, / / /--/ / / ANS ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel