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

Don't create shadow copy that already exists #147

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

KatoStoelen
Copy link
Contributor

In some scenarios the same unmanaged DLL is resolved multiple times
(e.g. when using System.Data.SQLite.SQLiteConnection). The previous
implementation would then try to create new shadow copies of the same
DLL during subsequent resolves. This failed during copy of the DLL since
the parameter to enable overwriting was not set to true.

This fix checks if the shadow copy already exists and skips the copy
step if it does. The path to the existing shadow copy is returned
instead.

Fixes #146

In some scenarios the same unmanaged DLL is resolved multiple times
(e.g. when using System.Data.SQLite.SQLiteConnection). The previous
implementation would then try to create new shadow copies of the same
DLL during subsequent resolves. This failed during copy of the DLL since
the parameter to enable overwriting was not set to true.

This fix checks if the shadow copy already exists and skips the copy
step if it does. The path to the existing shadow copy is returned
instead.

Fixes natemcmaster#146
Copy link
Owner

@natemcmaster natemcmaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@natemcmaster natemcmaster merged commit 0f397dd into natemcmaster:main Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shadow copy - Multiple resolves of same unmanaged DLL
2 participants