The first case was a subset of the second, which is not supposed to be
allowed, but isn't handled by harec yet.
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
fs/fs.ha | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/fs.ha b/fs/fs.ha
index 66f74025..5e813460 100644
--- a/fs/fs.ha
+++ b/fs/fs.ha
@@ -111,9 +111,12 @@ export fn rename(fs: *fs, oldpath: str, newpath: str) (void | error) = {
// copy and remove if necessary.
export fn move(fs: *fs, oldpath: str, newpath: str) (void | error) = {
match (rename(fs, oldpath, newpath)) {
- case (cannotrename | errors::unsupported) => void; // Fallback
case let err: error =>
- return err;
+ match (err) {
+ case (cannotrename | errors::unsupported) => void; // Fallback
+ case =>
+ return err;
+ };
case void =>
return; // Success
};
--
2.43.0