mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-22 07:28:43 -04:00
Clarify error that occurs when getting the hash of an on-demand file (#1722)
* Clarify Error - Clarifies error that occurs when attempting to read the metadata from an on-demand file * Make error more better Changed 'Attempted' to 'Failed' * Add comment and conditional compilation
This commit is contained in:
@@ -124,7 +124,22 @@ async fn identifier_job_step(
|
||||
(metadata, file_path),
|
||||
)
|
||||
})
|
||||
.map_err(|e| error!("Failed to extract file metadata: {e:#?}"))
|
||||
.map_err(|e| {
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
// Handle case where file is on-demand (NTFS only)
|
||||
if e.source.raw_os_error().map_or(false, |code| code == 362) {
|
||||
error!("Failed to extract metadata from on-demand file: {e:#?}");
|
||||
} else {
|
||||
error!("Failed to extract file metadata: {e:#?}")
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
{
|
||||
error!("Failed to extract file metadata: {e:#?}");
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user