src/eric7/Graphics/ImportsDiagramBuilder.py

branch
server
changeset 10585
83e5a9a64543
parent 10584
a596cf392291
child 10597
fbe93720ee9f
equal deleted inserted replaced
10584:a596cf392291 10585:83e5a9a64543
72 hasInit = True 72 hasInit = True
73 ppath = self.packagePath 73 ppath = self.packagePath
74 74
75 if FileSystemUtilities.isRemoteFileName(self.packagePath): 75 if FileSystemUtilities.isRemoteFileName(self.packagePath):
76 self.package = ( 76 self.package = (
77 FileSystemUtilities.plainFileName(self.packagePath)[1:] 77 self.__remotefsInterface.splitdrive(self.packagePath)[1][
78 .replace("/", ".") 78 1:
79 .replace("\\", ".") 79 ].replace(self.__remotefsInterface.separator(), ".")
80 ) 80 )
81 while hasInit: 81 while hasInit:
82 ppath = self.__remotefsInterface.dirname(ppath) 82 ppath = self.__remotefsInterface.dirname(ppath)
83 globPattern = self.__remotefsInterface.join(ppath, "__init__.*") 83 globPattern = self.__remotefsInterface.join(ppath, "__init__.*")
84 hasInit = len(self.__remotefsInterface.glob(globPattern)) > 0 84 hasInit = len(self.__remotefsInterface.glob(globPattern)) > 0
85 else: 85 else:
86 self.package = ( 86 self.package = os.path.splitdrive(self.packagePath)[1][1:].replace(
87 os.path.splitdrive(self.packagePath)[1][1:].replace(os.sep, ".") 87 os.sep, "."
88 ) 88 )
89 while hasInit: 89 while hasInit:
90 ppath = os.path.dirname(ppath) 90 ppath = os.path.dirname(ppath)
91 hasInit = len(glob.glob(os.path.join(ppath, "__init__.*"))) > 0 91 hasInit = len(glob.glob(os.path.join(ppath, "__init__.*"))) > 0
92 92

eric ide

mercurial