1. Rick Copeland
  2. EasyWidgets

Commits

Rick Copeland  committed 812f957 Merge
  • Participants
  • Parent commits 5ec224a, 549842f
  • Branches default

Comments (0)

Files changed (1)

File ew/resource.py

View file
         '''Translate a resource path to a filename'''
         for url_path, directory in self.paths:
             if res_path.startswith(url_path):
-                fs_path = os.path.join(
+                fs_path = os.path.abspath(os.path.join(
                     directory,
-                    res_path[len(url_path)+1:])
+                    res_path[len(url_path)+1:]))
                 # Do not allow 'breaking out' of the subdirectory using ../../.., etc
-                if not fs_path.startswith(directory):
+                if not fs_path.startswith(os.path.abspath(directory)):
                     return None
                 return fs_path
         return None