diff options
authorJoão Paulo Taylor Ienczak Zanette <>2020-08-24 16:52:43 +0000
committerStefan Schmidt <>2020-08-31 11:16:43 +0200
commitabc308accb39dc6f7e946108da1b5a65489bc051 (patch)
parent07d6a25c2060487014f3dcb19271935114af588a (diff)
eina: Replace remove with rmdir and delete tmpstr
Although the [remove manpage]( states that `remove(...)` deletes either a file or a directory, this is not true in Windows as it can be seen in [MSDN docs for remove]( > **(Function description)** > > Delete a file. > > **Return Value** > > Each of these functions returns 0 if the file is successfully deleted. > Otherwise, **it returns -1 and sets errno either to EACCES to indicate that the > path** specifies a read-only file, //**specifies a directory**//, or the file > is open, or to ENOENT to indicate that the filename or path was not found. This implementation detail caused the Eina test to fail and not removing the temporary directory. This patch changes the use of `remove` to the directory-specific `rmdir`, which is guaranteed to remove the directory. Additionally, it also deletes the Eina_TmpStr that holds the temporary directory path. Reviewed-by: Vincent Torri <> Reviewed-by: Stefan Schmidt <> Differential Revision:
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/eina/eina_test_file.c b/src/tests/eina/eina_test_file.c
index 8a9b13e29c..f8771896ef 100644
--- a/src/tests/eina/eina_test_file.c
+++ b/src/tests/eina/eina_test_file.c
@@ -849,7 +849,8 @@ EFL_START_TEST(eina_test_file_mktemp)
849 eina_iterator_free(it); 849 eina_iterator_free(it);
850 850
851 fail_if(unlink(tmpfile)); 851 fail_if(unlink(tmpfile));
852 fail_if(remove(tmpdir)); 852 fail_if(rmdir(tmpdir));
853 eina_tmpstr_del(tmpdir);
853} 854}
855 856