src/eric7/Project/Project.py

branch
eric7
changeset 9942
cf725cf57445
parent 9925
a267ac36dd69
child 10004
983477114d3c
child 10069
435cc5875135
equal deleted inserted replaced
9939:dcb96a3fc767 9942:cf725cf57445
3837 3837
3838 @param path file or directory name to convert (string) 3838 @param path file or directory name to convert (string)
3839 @return project relative path or unchanged path, if path doesn't 3839 @return project relative path or unchanged path, if path doesn't
3840 belong to the project (string) 3840 belong to the project (string)
3841 """ 3841 """
3842 if path is None:
3843 return ""
3844
3842 try: 3845 try:
3843 return str(pathlib.Path(path).relative_to(self.ppath)) 3846 return str(pathlib.Path(path).relative_to(self.ppath))
3844 except ValueError: 3847 except ValueError:
3845 return path 3848 return path
3846 3849

eric ide

mercurial