Changeset 1494

Show
Ignore:
Timestamp:
07/11/08 19:36:34 (7 weeks ago)
Author:
rob
Message:

Fixed default path to be wx.StandardPaths?.Get().GetDocumentsDir?() instead of defaulting to the directory in which peppy was started
* changed Buffer._cwd to only look at absolute paths before trying to match a non-file scheme to the local filesystem

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/buffers.py

    r1485 r1494  
    217217            path = os.path.normpath(os.path.dirname(unicode(url.path))) 
    218218        else: 
    219             # See if the path converts to an existing path in the local 
    220             # filesystem by converting it to a file:// url and seeing if any 
    221             # path components exist 
     219            # If it's an absolute path, see if it converts to an existing path 
     220            # in the local filesystem by converting it to a file:// url and 
     221            # seeing if any path components exist 
    222222            lastpath = None 
     223            temp = unicode(url.path) 
     224            if not temp.startswith('/'): 
     225                return '/' 
    223226            uri = vfs.normalize(unicode(url.path)) 
    224227            path = os.path.normpath(unicode(uri.path)) 
    225228            while path != lastpath and path != '/': 
    226                 #dprint("trying %s" % path) 
     229                dprint("trying %s" % path) 
    227230                if os.path.isdir(path): 
    228231                    break 
     
    256259         
    257260        if path == '/': 
    258             path = os.getcwd() 
     261            path = wx.StandardPaths.Get().GetDocumentsDir() 
    259262        return path 
    260263