mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-19 13:55:40 -04:00
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.
This commit is contained in:
@@ -150,11 +150,11 @@ impl DatabaseStorage {
|
||||
#[cfg(windows)]
|
||||
pub fn get_inode(path: &Path, _metadata: &std::fs::Metadata) -> Option<u64> {
|
||||
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
|
||||
|
||||
@@ -51,11 +51,11 @@ impl LocalBackend {
|
||||
#[cfg(windows)]
|
||||
fn get_inode(path: &Path, _metadata: &std::fs::Metadata) -> Option<u64> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user