Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab5d602

Browse files
committed
Fix directory remove
1 parent df12009 commit ab5d602

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/dir.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ dir_list_file_internal(parray *files, const char *root, pgFile *parent,
686686

687687
join_path_components(child, parent->path, dent->d_name);
688688

689-
file = pgFileNew(child, omit_symlink, FIO_LOCAL_HOST);
689+
file = pgFileNew(child, omit_symlink, location);
690690
if (file == NULL)
691691
continue;
692692

src/utils/file.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ int fio_unlink(char const* path, fio_location location)
664664
}
665665
else
666666
{
667-
return unlink(path);
667+
return remove(path);
668668
}
669669
}
670670

@@ -925,7 +925,7 @@ void fio_communicate(int in, int out)
925925
SYS_CHECK(rename(buf, buf + strlen(buf) + 1));
926926
break;
927927
case FIO_UNLINK:
928-
SYS_CHECK(unlink(buf));
928+
SYS_CHECK(remove(buf));
929929
break;
930930
case FIO_MKDIR:
931931
SYS_CHECK(dir_create_dir(buf, hdr.arg));

0 commit comments

Comments
 (0)