Commit d2fc9d09 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-18204 - fixup

parent e3f6ea50
......@@ -1633,8 +1633,6 @@ ibx_copy_incremental_over_full()
}
}
}
if (directory_exists(ROCKSDB_BACKUP_DIR, false)) {
if (my_rmtree(ROCKSDB_BACKUP_DIR, MYF(0))) {
die("Can't remove " ROCKSDB_BACKUP_DIR);
......@@ -1647,6 +1645,8 @@ ibx_copy_incremental_over_full()
}
copy_or_move_dir(path, ROCKSDB_BACKUP_DIR, true, true);
}
}
cleanup:
if (it != NULL) {
......
......@@ -170,12 +170,13 @@ int my_rmtree(const char *dir, myf MyFlags)
char path[FN_REFLEN];
char sep[] = { FN_LIBCHAR, 0 };
int err = 0;
uint i;
MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT));
if (!dir_info)
return 1;
for (uint i = 0; i < dir_info->number_of_files; i++)
for (i = 0; i < dir_info->number_of_files; i++)
{
FILEINFO *file = dir_info->dir_entry + i;
/* Skip "." and ".." */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment