diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2011-03-22 19:45:01 +0100 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-03-23 00:08:16 +0200 |
| commit | ae6ba7f713804e1c04febee81a8f52ea0abf443b (patch) | |
| tree | 0c8d3cf74aa05ab1350578e446fa8a3caa1a66db | |
| parent | 56d8ca266c92e51a1b38ac68b7aa6a24193f5812 (diff) | |
| download | libgit2-ae6ba7f713804e1c04febee81a8f52ea0abf443b.tar.gz | |
Fix gitfo_mv() behavior when running on Windows
When the system temporary folder is located on a different volume than the working directory into which libgit2 is executing, MoveFileEx() requires an additional flag.
| -rw-r--r-- | src/fileops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c index 237a16a9f..a884b4002 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -263,7 +263,7 @@ int gitfo_mv(const char *from, const char *to) * file exists, the `rename` call fails. This is as * close as it gets with the Win32 API. */ - return MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING) ? GIT_SUCCESS : GIT_EOSERR; + return MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) ? GIT_SUCCESS : GIT_EOSERR; #else /* Don't even try this on Win32 */ if (!link(from, to)) { |
