8175 @rtype str |
8175 @rtype str |
8176 """ |
8176 """ |
8177 # if we have an active source, return its path |
8177 # if we have an active source, return its path |
8178 if self.activeWindow() is not None: |
8178 if self.activeWindow() is not None: |
8179 fn = self.activeWindow().getFileName() |
8179 fn = self.activeWindow().getFileName() |
8180 if ( |
8180 if forRemote and FileSystemUtilities.isRemoteFileName(fn): |
8181 (forRemote and FileSystemUtilities.isRemoteFileName(fn)) |
8181 return ( |
8182 or (not forRemote and FileSystemUtilities.isPlainFileName(fn)) |
8182 ericApp().getObject("EricServer").getServiceInterface("FileSystem") |
8183 ): |
8183 .dirname(fn) |
8184 return os.path.dirname(self.activeWindow().getFileName()) |
8184 ) |
|
8185 if not forRemote and FileSystemUtilities.isPlainFileName(fn): |
|
8186 return os.path.dirname(fn) |
8185 |
8187 |
8186 # check, if there is an active project and return its path |
8188 # check, if there is an active project and return its path |
8187 if ericApp().getObject("Project").isOpen(): |
8189 if ericApp().getObject("Project").isOpen(): |
8188 ppath = ericApp().getObject("Project").ppath |
8190 ppath = ericApp().getObject("Project").ppath |
8189 if ( |
8191 if ( |