Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #1480 (closed)

Opened 15 years ago

Closed 15 years ago

Test for "/" will not hold true on Windows

Reported by: jamoore Owned by: cblackburn
Priority: blocker Cc: jnj-support@…
Sprint: n.a.
Total Remaining Time: n.a.

Description

The fileInNewDir won't work on Windows:

    def fileInNewDir(self, fileId):
        """
            Is the file in one of the new and as yet unimported directories?
            
        """
        dirName = pathModule.path(fileId).dirname()
        while dirName != '/' and dirName not in self.newDirs:
            dirName = pathModule.path(dirName).dirname()
        
        return dirName

cF.

>>> from path import path
>>> p = path(".")
>>> p
path(u'.')
>>> p.abspath()
path(u'C:\\hudson\\workspace\\omero-windows-integration\\trunk\\dist')
>>> p = p.abspath()
>>> p.dirname()
path(u'C:\\hudson\\workspace\\omero-windows-integration\\trunk')
>>> p = p.dirname()
...
>>> p
path(u'C:\\')
>>> p = p.dirname()
>>> p
path(u'C:\\')
>>> p == "/"
False
>>> p == "C:\\"
True
>>>

Change History (1)

comment:1 Changed 15 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.62678 sec.)

We're Hiring!