File tree Expand file tree Collapse file tree
src-tauri/src/file_system Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,17 +59,19 @@ fn get_sync_status(path: &Path) -> SyncStatus {
5959 }
6060 } else {
6161 // File has local content - could be synced or uploading
62- if is_uploading ( path) {
63- SyncStatus :: Uploading
64- } else {
65- SyncStatus :: Synced
62+ // Use is_cloud_file() to check if this is actually a cloud file
63+ match is_uploading_cloud_file ( path) {
64+ Some ( true ) => SyncStatus :: Uploading ,
65+ Some ( false ) => SyncStatus :: Synced ,
66+ None => SyncStatus :: Unknown , // Not a cloud file
6667 }
6768 }
6869}
6970
7071/// Checks if file is currently uploading via NSURL resource values.
71- fn is_uploading ( path : & Path ) -> bool {
72- get_ubiquitous_bool ( path, "NSURLUbiquitousItemIsUploadingKey" ) . unwrap_or ( false )
72+ /// Returns None if file is not a cloud file.
73+ fn is_uploading_cloud_file ( path : & Path ) -> Option < bool > {
74+ get_ubiquitous_bool ( path, "NSURLUbiquitousItemIsUploadingKey" )
7375}
7476
7577/// Checks if file is currently downloading via NSURL resource values.
You can’t perform that action at this time.
0 commit comments