FileCommands: support remove database files
This commit is contained in:
parent
1873c67540
commit
bb3b836dbb
@ -152,14 +152,21 @@ handle_read_comments(Client &client, gcc_unused int argc, char *argv[])
|
|||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
}
|
}
|
||||||
|
|
||||||
AllocatedPath path_fs = storage->MapFS(uri);
|
{
|
||||||
if (path_fs.IsNull()) {
|
AllocatedPath path_fs = storage->MapFS(uri);
|
||||||
command_error(client, ACK_ERROR_NO_EXIST,
|
if (!path_fs.IsNull())
|
||||||
"No such file");
|
return read_file_comments(client, path_fs);
|
||||||
return CommandResult::ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return read_file_comments(client, path_fs);
|
{
|
||||||
|
const std::string uri2 = storage->MapUTF8(uri);
|
||||||
|
if (uri_has_scheme(uri2.c_str()))
|
||||||
|
return read_stream_comments(client,
|
||||||
|
uri2.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
command_error(client, ACK_ERROR_NO_EXIST, "No such file");
|
||||||
|
return CommandResult::ERROR;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
command_error(client, ACK_ERROR_NO_EXIST, "No such file");
|
command_error(client, ACK_ERROR_NO_EXIST, "No such file");
|
||||||
|
Loading…
Reference in New Issue
Block a user