Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[#690] Fixed parent path detection

  • Loading branch information...
commit 284041230488ea6fb2916ee4704119f42115b468 1 parent ae29928
@trecloux authored
Showing with 1 addition and 11 deletions.
  1. +1 −11 framework/pym/play/utils.py
View
12 framework/pym/play/utils.py
@@ -35,17 +35,7 @@ def secretKey():
return ''.join([random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') for i in range(64)])
def isParentOf(path1, path2):
- if len(path2) < len(path1) or len(path2) < 2:
- return False
- if (path1 == path2):
- return True
- return isParentOf(path1, os.path.dirname(path2))
-
-def isParentOf(path1, path2):
- if len(path2) < len(path1) or len(path2) < 2:
- return False
- if (path1 == path2):
- return True
+ return path2.startswith(path1 + '/' )
@ryenus
ryenus added a note

shouldn't we use os.sep instead of hardcoded '/' here?

@pepite
pepite added a note

Yes I think you are right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
def getWithModules(args, env):
withModules = []
@ryenus

shouldn't we use os.sep instead of hardcoded '/' here?

@pepite

Yes I think you are right

Please sign in to comment.
Something went wrong with that request. Please try again.