We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
exclude_from_content_indexing
1 parent 9d96a88 commit f1c8e56Copy full SHA for f1c8e56
crates/cargo-util/src/paths.rs
@@ -685,9 +685,12 @@ fn exclude_from_content_indexing(path: &Path) {
685
use winapi::um::fileapi::{GetFileAttributesW, SetFileAttributesW};
686
use winapi::um::winnt::FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
687
688
- let lp_path: Vec<u16> = path.as_os_str().encode_wide().chain(once(0)).collect();
+ let path: Vec<u16> = path.as_os_str().encode_wide().chain(once(0)).collect();
689
unsafe {
690
- SetFileAttributesW(lp_path.as_ptr(), GetFileAttributesW(lp_path.as_ptr()) | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
+ SetFileAttributesW(
691
+ path.as_ptr(),
692
+ GetFileAttributesW(path.as_ptr()) | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
693
+ );
694
}
695
} else {
696
let _ = path;
0 commit comments