Ignore shm deletion errors.
This commit is contained in:
parent
191c732245
commit
dc6d9822a2
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
|
#include "td/utils/misc.h"
|
||||||
#include "td/utils/port/path.h"
|
#include "td/utils/port/path.h"
|
||||||
#include "td/utils/port/Stat.h"
|
#include "td/utils/port/Stat.h"
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ Status RawSqliteDb::destroy(Slice path) {
|
|||||||
Status error;
|
Status error;
|
||||||
with_db_path(path, [&](auto path) {
|
with_db_path(path, [&](auto path) {
|
||||||
unlink(path).ignore();
|
unlink(path).ignore();
|
||||||
if (!stat(path).is_error()) {
|
if (!ends_with(path, "-shm") && !stat(path).is_error()) {
|
||||||
error = Status::Error(PSLICE() << "Failed to delete file \"" << path << '"');
|
error = Status::Error(PSLICE() << "Failed to delete file \"" << path << '"');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user