From cc252c0fbc1b95d89189eaf2d69eb9f63b005292 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Tue, 30 Dec 2025 17:30:28 -0800 Subject: [PATCH] fix(windows): update imports in database_storage and local backend for clarity - Added GENERIC_READ import directly in both database_storage.rs and local.rs to enhance clarity in Windows API usage. - Ensured consistency in handling Windows-specific functionality across the codebase. --- core/src/ops/indexing/database_storage.rs | 4 ++-- core/src/volume/backend/local.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/ops/indexing/database_storage.rs b/core/src/ops/indexing/database_storage.rs index 50e28325e..dba755a8c 100644 --- a/core/src/ops/indexing/database_storage.rs +++ b/core/src/ops/indexing/database_storage.rs @@ -150,11 +150,11 @@ impl DatabaseStorage { #[cfg(windows)] pub fn get_inode(path: &Path, _metadata: &std::fs::Metadata) -> Option { use std::os::windows::ffi::OsStrExt; - use windows_sys::Win32::Foundation::{CloseHandle, INVALID_HANDLE_VALUE}; + use windows_sys::Win32::Foundation::{CloseHandle, GENERIC_READ, INVALID_HANDLE_VALUE}; use windows_sys::Win32::Storage::FileSystem::{ CreateFileW, GetFileInformationByHandle, BY_HANDLE_FILE_INFORMATION, FILE_FLAG_BACKUP_SEMANTICS, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE, - GENERIC_READ, OPEN_EXISTING, + OPEN_EXISTING, }; // Convert path to wide string for Windows API diff --git a/core/src/volume/backend/local.rs b/core/src/volume/backend/local.rs index 53f9c8542..130fd868e 100644 --- a/core/src/volume/backend/local.rs +++ b/core/src/volume/backend/local.rs @@ -51,11 +51,11 @@ impl LocalBackend { #[cfg(windows)] fn get_inode(path: &Path, _metadata: &std::fs::Metadata) -> Option { use std::os::windows::ffi::OsStrExt; - use windows_sys::Win32::Foundation::{CloseHandle, INVALID_HANDLE_VALUE}; + use windows_sys::Win32::Foundation::{CloseHandle, GENERIC_READ, INVALID_HANDLE_VALUE}; use windows_sys::Win32::Storage::FileSystem::{ CreateFileW, GetFileInformationByHandle, BY_HANDLE_FILE_INFORMATION, FILE_FLAG_BACKUP_SEMANTICS, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE, - GENERIC_READ, OPEN_EXISTING, + OPEN_EXISTING, }; // Convert path to wide string for Windows API