externalPath = components.externalPath
else:
externalPath = os.path.join(cwd, components.externalPath)
unglobbed_paths = glob.glob(os.path.expanduser(externalPath))
if not unglobbed_paths:
raise FileNotFoundError(externalPath)
for ext_path in unglobbed_paths:
if not cls.fileHasInternalPaths(ext_path) or not components.internalPath:
After Change
cwd = cwd or os.getcwd()
pathComponents = [PathComponents(path) for path in splitPath(file_path)]
expanded_paths = []
missing_files = []
for components in pathComponents:
if os.path.isabs(components.externalPath):
externalPath = components.externalPath
else:
externalPath = os.path.join(cwd, components.externalPath)
expanded_path = os.path.expanduser(externalPath)
unglobbed_paths = glob.glob(expanded_path)
if not unglobbed_paths:
missing_files.append(expanded_path)
continue
for ext_path in unglobbed_paths:
if not cls.fileHasInternalPaths(ext_path) or not components.internalPath:
expanded_paths.append(ext_path)