Parcourir la source

Better error handling

nwin il y a 11 ans
Parent
commit
4fd832aa5b
1 fichiers modifiés avec 10 ajouts et 4 suppressions
  1. 10 4
      src/xattr/xattr_darwin.rs

+ 10 - 4
src/xattr/xattr_darwin.rs

@@ -87,12 +87,18 @@ impl Attribute {
                 }
                 Ok(names)
             } else {
-                // Ignore error for now
-                Ok(Vec::new())
+                Err(io::IoError {
+                    kind: io::OtherIoError,
+                    desc: "could not read extended attributes",
+                    detail: None
+                })
             }
         } else {
-            // Ignore error for now
-            Ok(Vec::new())
+            Err(io::IoError {
+                kind: io::OtherIoError,
+                desc: "could not read extended attributes",
+                detail: None
+            })
         }
     }