-
Notifications
You must be signed in to change notification settings - Fork 11
Fixed vmdk thin opening when parentFileNameHint was set to full path #76
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
base: main
Are you sure you want to change the base?
Conversation
Schamper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe nice to swap it around, since I think for our purposes we generally have the first case scenario.
| filename_hint = filename_hint.replace("\\", "/") | ||
| hint_path, _, filename = filename_hint.rpartition("/") | ||
| filepath = path.joinpath(filename) | ||
| filepath = path.joinpath(filename_hint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| filepath = path.joinpath(filename_hint) | |
| filepath = path.joinpath(filename) |
| if not filepath.exists(): | ||
| _, _, hint_path_name = hint_path.rpartition("/") | ||
| filepath = path.parent.joinpath(hint_path_name).joinpath(filename) | ||
| filepath = path.joinpath(filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| filepath = path.joinpath(filename) | |
| filepath = path.joinpath(filename_hint) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
==========================================
+ Coverage 78.64% 79.04% +0.40%
==========================================
Files 26 26
Lines 2332 2334 +2
==========================================
+ Hits 1834 1845 +11
+ Misses 498 489 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed VMDK thin opening when parentFileNameHint was set to full path
When attempting to mount a VMDK file that was created using thin
provisioning, it would fail with a file not found error on the parent VMDK
file, due to it attempting to find it in the same directory. However, the
parentFileNameHint was set to the full path of the parent VMDK file, but
ignored by dissect. This pull requests attempts to load the VMDK parent
file using the parentFileNameHint first, before continuing with the
existing loading method.
Fixes #77