diff --git a/src/dir.c b/src/dir.c index 2c21ea3a..4e4cffd8 100644 --- a/src/dir.c +++ b/src/dir.c @@ -686,7 +686,7 @@ dir_list_file_internal(parray *files, const char *root, pgFile *parent, join_path_components(child, parent->path, dent->d_name); - file = pgFileNew(child, omit_symlink, FIO_LOCAL_HOST); + file = pgFileNew(child, omit_symlink, location); if (file == NULL) continue; diff --git a/src/utils/file.c b/src/utils/file.c index c1102496..8055ed9d 100644 --- a/src/utils/file.c +++ b/src/utils/file.c @@ -664,7 +664,7 @@ int fio_unlink(char const* path, fio_location location) } else { - return unlink(path); + return remove(path); } } @@ -925,7 +925,7 @@ void fio_communicate(int in, int out) SYS_CHECK(rename(buf, buf + strlen(buf) + 1)); break; case FIO_UNLINK: - SYS_CHECK(unlink(buf)); + SYS_CHECK(remove(buf)); break; case FIO_MKDIR: SYS_CHECK(dir_create_dir(buf, hdr.arg));