summaryrefslogtreecommitdiffstats
path: root/Cargo.lock
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2018-02-01 21:11:02 -0500
committerAndrew Gallant <jamslam@gmail.com>2018-02-01 21:11:02 -0500
commite36b65a11a7fa72e4b43f89c71441884269f0522 (patch)
treea5689bc6178f6665e0c441bc7f2243f0fff49cf7 /Cargo.lock
parent11ad7ab204f415d6e3af35b9e8c8907092857266 (diff)
windows: fix OneDrive traversals
This commit fixes a bug on Windows where directory traversals were completely broken when attempting to scan OneDrive directories that use the "file on demand" strategy. The specific problem was that Rust's standard library treats OneDrive directories as reparse points instead of directories, which causes methods like `FileType::is_file` and `FileType::is_dir` to always return false, even when retrieved via methods like `metadata` that purport to follow symbolic links. We fix this by peppering our code with checks on the underlying file attributes exposed by Windows. We consider an entry a directory if and only if the directory bit is set on the attributes. We are careful to make sure that the code remains the same on non-Windows platforms. Note that we also bump the dependency on `walkdir`, which contains a similar fix for its traversals. This bug is recorded upstream: https://github.com/rust-lang/rust/issues/46484 Upstream also has a pending PR: https://github.com/rust-lang/rust/pull/47956 Fixes #705
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock9
1 files changed, 6 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 13fbb69a..c9291faf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -134,7 +134,8 @@ dependencies = [
"same-file 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "walkdir 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "walkdir 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -249,6 +250,7 @@ dependencies = [
"regex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"same-file 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"termcolor 0.3.3",
+ "winapi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -341,10 +343,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "walkdir"
-version = "2.1.1"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"same-file 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -412,7 +415,7 @@ dependencies = [
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
-"checksum walkdir 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb9e0499dfaf907659414fa6895e019db6694aa5ecb36e1a8003b6ba472d5705"
+"checksum walkdir 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e44abc83f36bfebb7ee3e140d324dfb4a75d17047d9d16c49143aafeb122cff"
"checksum winapi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "890b38836c01d72fdb636d15c9cfc52ec7fd783b330abc93cd1686f4308dfccc"
"checksum winapi-i686-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6667f60c23eca65c561e63a13d81b44234c2e38a6b6c959025ee907ec614cc"
"checksum winapi-x86_64-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98f12c52b2630cd05d2c3ffd8e008f7f48252c042b4871c72aed9dc733b96668"