diff options
author | Brad King <brad.king@kitware.com> | 2014-04-03 18:37:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-03 19:02:49 (GMT) |
commit | 2f1978632b709a9370b3cb1137375c05351d149c (patch) | |
tree | 85980710818211b8188709643e6714e8839feee9 /Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c | |
parent | 23e4666cf57c31c719472debba83a43f54d351d8 (diff) | |
parent | 64713ae3ffddf6fbbfa7ea762c3d756cb245a066 (diff) | |
download | CMake-2f1978632b709a9370b3cb1137375c05351d149c.zip CMake-2f1978632b709a9370b3cb1137375c05351d149c.tar.gz CMake-2f1978632b709a9370b3cb1137375c05351d149c.tar.bz2 |
Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in favor of the upstream side where possible.
Resolve a logical conflict in archive_windows.h where the upstream
port to Watcom was done slightly differently from ours.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c index 9c5420d..5c0f366 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c @@ -929,7 +929,7 @@ next_entry(struct archive_read_disk *a, struct tree *t, else flags |= FILE_FLAG_SEQUENTIAL_SCAN; t->entry_fh = CreateFileW(tree_current_access_path(t), - GENERIC_READ, 0, NULL, OPEN_EXISTING, flags, NULL); + GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, flags, NULL); if (t->entry_fh == INVALID_HANDLE_VALUE) { archive_set_error(&a->archive, errno, "Couldn't open %ls", tree_current_path(a->tree)); @@ -1886,7 +1886,7 @@ tree_current_file_information(struct tree *t, BY_HANDLE_FILE_INFORMATION *st, if (sim_lstat && tree_current_is_physical_link(t)) flag |= FILE_FLAG_OPEN_REPARSE_POINT; - h = CreateFileW(tree_current_access_path(t), 0, 0, NULL, + h = CreateFileW(tree_current_access_path(t), 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, flag, NULL); if (h == INVALID_HANDLE_VALUE) { la_dosmaperr(GetLastError()); @@ -2115,7 +2115,7 @@ archive_read_disk_entry_from_file(struct archive *_a, } else desiredAccess = GENERIC_READ; - h = CreateFileW(path, desiredAccess, 0, NULL, + h = CreateFileW(path, desiredAccess, FILE_SHARE_READ, NULL, OPEN_EXISTING, flag, NULL); if (h == INVALID_HANDLE_VALUE) { la_dosmaperr(GetLastError()); @@ -2162,7 +2162,7 @@ archive_read_disk_entry_from_file(struct archive *_a, if (fd >= 0) { h = (HANDLE)_get_osfhandle(fd); } else { - h = CreateFileW(path, GENERIC_READ, 0, NULL, + h = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); if (h == INVALID_HANDLE_VALUE) { la_dosmaperr(GetLastError()); |