1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-09-16 09:26:30 +02:00

Fix directory remove

This commit is contained in:
Konstantin Knizhnik
2019-01-24 18:33:53 +03:00
parent df120095b1
commit ab5d602258
2 changed files with 3 additions and 3 deletions

View File

@@ -686,7 +686,7 @@ dir_list_file_internal(parray *files, const char *root, pgFile *parent,
join_path_components(child, parent->path, dent->d_name); 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) if (file == NULL)
continue; continue;

View File

@@ -664,7 +664,7 @@ int fio_unlink(char const* path, fio_location location)
} }
else 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)); SYS_CHECK(rename(buf, buf + strlen(buf) + 1));
break; break;
case FIO_UNLINK: case FIO_UNLINK:
SYS_CHECK(unlink(buf)); SYS_CHECK(remove(buf));
break; break;
case FIO_MKDIR: case FIO_MKDIR:
SYS_CHECK(dir_create_dir(buf, hdr.arg)); SYS_CHECK(dir_create_dir(buf, hdr.arg));