mirror of
https://gitee.com/openharmony/distributeddatamgr_relational_store
synced 2024-11-27 01:01:02 +00:00
backup
Signed-off-by: lihuihui <lihuihui29@huawei.com>
This commit is contained in:
parent
7a9449b67d
commit
98dcdf5bd1
@ -639,7 +639,10 @@ int RdbStoreImpl::Backup(const std::string databasePath, const std::vector<uint8
|
||||
return ret;
|
||||
}
|
||||
std::string tempPath = backupFilePath + "temp";
|
||||
if (access(backupFilePath.c_str(), F_OK) != E_OK) {
|
||||
while (access(tempPath.c_str(), F_OK) == E_OK) {
|
||||
tempPath += "temp";
|
||||
}
|
||||
if (access(backupFilePath.c_str(), F_OK) == E_OK) {
|
||||
SqliteUtils::RenameFile(backupFilePath, tempPath);
|
||||
ret = InnerBackup(backupFilePath, destEncryptKey);
|
||||
if (ret == E_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user