From 13e57246216c946594862938a392e4b8fab4e8b4 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 20 Sep 2016 03:02:48 +0200 Subject: test/helpers.rmdir(): lfs.rmdir() instead of os.remove() os.remove() fails on empty directories in non-POSIX systems. https://github.com/keplerproject/luafilesystem/issues/4 lfs.rmdir() "usually" works, so use it instead. Closes #5236 --- test/functional/helpers.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 0fb168b736..d5b7442b57 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -424,15 +424,15 @@ local function do_rmdir(path) end end end - local ret, err = os.remove(path) + local ret, err = lfs.rmdir(path) if not ret then - error('os.remove: '..err) + error('lfs.rmdir('..path..'): '..err) end return ret end local function rmdir(path) - local ret, err = pcall(do_rmdir, path) + local ret, _ = pcall(do_rmdir, path) -- During teardown, the nvim process may not exit quickly enough, then rmdir() -- will fail (on Windows). if not ret then -- Try again. -- cgit