diff options
author | midipix <writeonce@midipix.org> | 2021-04-15 06:27:57 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-04-15 08:03:32 +0000 |
commit | e524bdc940fa8826a9d076a9b9cb250d1bad71c4 (patch) | |
tree | abded00aefecc5c957f933cc9bcb17d3d25a9194 /src/logic | |
parent | d586fc76aa37919351355792e7ef829d30cf3922 (diff) | |
download | slibtool-e524bdc940fa8826a9d076a9b9cb250d1bad71c4.tar.bz2 slibtool-e524bdc940fa8826a9d076a9b9cb250d1bad71c4.tar.xz |
library: replace all uses of rmdir() with unlinkat().
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/slbt_exec_uninstall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_uninstall.c b/src/logic/slbt_exec_uninstall.c index 2930c26..b904ef7 100644 --- a/src/logic/slbt_exec_uninstall.c +++ b/src/logic/slbt_exec_uninstall.c @@ -90,7 +90,7 @@ static int slbt_exec_uninstall_fs_entry( /* directory? */ if (S_ISDIR(st.st_mode)) { - if (!(rmdir(path))) + if (!unlinkat(fdcwd,path,AT_REMOVEDIR)) return 0; else if ((errno == EEXIST) || (errno == ENOTEMPTY)) @@ -114,7 +114,7 @@ static int slbt_exec_uninstall_fs_entry( *slash = 0; - if (rmdir(dpath)) + if (unlinkat(fdcwd,dpath,AT_REMOVEDIR)) return SLBT_SYSTEM_ERROR(dctx,dpath); } |