mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Try to fix repository parent path symlink issue.
For issue #417. Apparently if there is a symlink somewhere in the checkout location's parent path, libgit2 will try to remove that symlink. Searching the code for the error message given points to the GIT_CHECKOUT_DONT_REMOVE_EXISTING flag controlling this behaviour, though it seems to be intended only for paths within the checkout directory.
This commit is contained in:
+1
-1
@@ -285,7 +285,7 @@ namespace loot {
|
||||
char * paths = new char[filename.length() + 1];
|
||||
strcpy(paths, filename.c_str());
|
||||
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
|
||||
checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE;
|
||||
checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_DONT_REMOVE_EXISTING;
|
||||
checkout_opts.paths.strings = &paths;
|
||||
checkout_opts.paths.count = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user