Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed list file entries to provide full OS path #100

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions dfimagetools/file_entry_lister.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,13 @@ def ListFileEntries(self, base_path_specs):
path_specification_string]))
return

base_path_segments = self._GetBasePathSegments(base_path_spec.parent)
if base_path_spec.type_indicator != dfvfs_definitions.TYPE_INDICATOR_OS:
base_path_segments = self._GetBasePathSegments(base_path_spec.parent)
else:
base_path_segments = file_system.SplitPath(base_path_spec.location)
base_path_segments.insert(0, '')
base_path_segments.pop()

for result in self._ListFileEntry(
file_system, file_entry, base_path_segments):
yield result
Expand All @@ -185,7 +191,12 @@ def ListFileEntriesWithFindSpecs(self, base_path_specs, find_specs):
else:
mount_point = base_path_spec.parent

base_path_segments = self._GetBasePathSegments(base_path_spec.parent)
if base_path_spec.type_indicator != dfvfs_definitions.TYPE_INDICATOR_OS:
base_path_segments = self._GetBasePathSegments(base_path_spec.parent)
else:
base_path_segments = file_system.SplitPath(base_path_spec.location)
base_path_segments.insert(0, '')
base_path_segments.pop()

searcher = file_system_searcher.FileSystemSearcher(
file_system, mount_point)
Expand Down
Loading