From 9f8c4093184c8fc1efb8e34b044d5e31de809244 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 9 Sep 2016 09:31:32 -0400 Subject: [PATCH] core::file: fix `rmdir` to raise an error on failure to remove a folder MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/core/file.nit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/file.nit b/lib/core/file.nit index dc1ccb7..d19bb8e 100644 --- a/lib/core/file.nit +++ b/lib/core/file.nit @@ -738,7 +738,7 @@ class Path # Delete the directory itself if things are fine if last_error == null then - if path.to_cstring.rmdir then + if not path.to_cstring.rmdir then last_error = new IOError("Cannot remove `{self}`: {sys.errno.strerror}") end end -- 1.7.9.5