[Trac-tickets] [The Trac Project] #1705: Attachment fail on Win32 without normalization of env.path

The Trac Project noreply at edgewall.com
Thu Jun 23 08:14:02 CDT 2005


#1705: Attachment fail on Win32 without normalization of env.path
---------------------+------------------------------------------------------
       Id:  1705     |      Status:  new                               
Component:  general  |    Modified:  Thu Jun 23 08:13:51 2005          
 Severity:  normal   |   Milestone:                                    
 Priority:  normal   |     Version:  devel                             
    Owner:  jonas    |    Reporter:  Shun-ichi Goto <gotoh at taiyo.co.jp>
---------------------+------------------------------------------------------
 I think that the value of Environment.path should be normalized nortation
 like 'c:\trac\project' not 'c:/trac/project' on windows environment.
 This style like 'c:/dir/dir' is usual in httpd.conf
 but it would cuase unexpected result of os.path.commonprefix() used in
 attachment.py.
 Thus adding attachement would fail.

 {{{
 Index: env.py
 ===================================================================
 --- env.py      (revision 1846)
 +++ env.py      (working copy)
 @@ -78,7 +78,7 @@
          except ImportError:
              pass

 -        self.path = path
 +        self.path = os.path.normpath(path)
          self.__cnx_pool = None
          if create:
              self.create(db_str)
 }}}

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/1705>
The Trac Project <>


More information about the Trac-Tickets mailing list