mirror of
https://github.com/schoebel/mars
synced 2025-01-01 20:02:18 +00:00
infra: fix unnecessary unlink
This commit is contained in:
parent
1b883e232b
commit
03e69bdd5c
@ -217,9 +217,9 @@ struct mapfree_info *mapfree_get(const char *name, int flags)
|
||||
|
||||
/* allow replacement of a .deleted symlink */
|
||||
if (flags & O_CREAT) {
|
||||
const char *check = ordered_readlink(name, NULL);
|
||||
const char *check = mars_readlink(name, NULL);
|
||||
|
||||
if (check && !*check)
|
||||
if (check && !strcmp(check, MARS_DELETED_STR))
|
||||
mars_unlink(name);
|
||||
|
||||
brick_string_free(check);
|
||||
|
Loading…
Reference in New Issue
Block a user