Skip to content

Commit

Permalink
refactor(rez-env) simplify Windows case sensitivity check
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdaclan committed Aug 14, 2019
1 parent 8215f88 commit 36c515b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/rezplugins/package_repository/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,16 +786,10 @@ def _get_families(self):

def _get_family(self, name):
is_valid_package_name(name, raise_error=True)
if "Windows" in platform.system():
if os.path.isdir(self.location):
if name in os.listdir(self.location):
family = self.get_resource(
FileSystemPackageFamilyResource.key,
location=self.location,
name=name)
return family
return None
elif os.path.isdir(os.path.join(self.location, name)):
if os.path.isdir(os.path.join(self.location, name)):
# force case-sensitive match on pkg family, on case-insensitive platforms
if "Windows" in platform.system() and name not in os.listdir(self.location):
return None
family = self.get_resource(
FileSystemPackageFamilyResource.key,
location=self.location,
Expand Down

0 comments on commit 36c515b

Please sign in to comment.