예제 #1
0
 def normalize_playable_path(self, path):
     if '://' in path:
         return path
     if not os.path.isabs(path):
         return os.path.normpath(os.path.join(self.parent.path, path))
     if check_under_base(path, self.app.config['directory_base']):
         return os.path.normpath(path)
     return None
예제 #2
0
 def normalize_playable_path(self, path):
     if "://" in path:
         return path
     path = os.path.normpath(path)
     if not os.path.isabs(path):
         return os.path.join(self.parent.path, path)
     drive = os.path.splitdrive(self.path)[0]
     if drive and not os.path.splitdrive(path)[0]:
         path = drive + path
     if check_under_base(path, self.app.config["directory_base"]):
         return path
     return None
예제 #3
0
 def normalize_playable_path(self, path):
     if '://' in path:
         return path
     path = os.path.normpath(path)
     if not os.path.isabs(path):
         return os.path.join(self.parent.path, path)
     drive = os.path.splitdrive(self.path)[0]
     if drive and not os.path.splitdrive(path)[0]:
         path = drive + path
     if check_under_base(path, self.app.config['directory_base']):
         return path
     return None