diff --git a/frameworks/native/backup_ext/src/tar_file.cpp b/frameworks/native/backup_ext/src/tar_file.cpp index 3a52d9dcb26423967c06c8ad1260ffd4a6265006..8b8216e9aa0213a7dd73490af3fbbe01640cba25 100644 --- a/frameworks/native/backup_ext/src/tar_file.cpp +++ b/frameworks/native/backup_ext/src/tar_file.cpp @@ -169,6 +169,7 @@ bool TarFile::I2OcsConvert(const struct stat &st, TarHeader &hdr, string &fileNa bool TarFile::AddFile(string &fileName, const struct stat &st, bool isSplit) { + HILOGI("tar file %{public}s", fileName.c_str()); currentFileName_ = fileName; TarHeader hdr; diff --git a/frameworks/native/backup_ext/src/untar_file.cpp b/frameworks/native/backup_ext/src/untar_file.cpp index f48a809faf0842bcfc3a0bece0467e3a4c54e694..5c72a11a4159c4eb549b92ff9f0d788447181404 100644 --- a/frameworks/native/backup_ext/src/untar_file.cpp +++ b/frameworks/native/backup_ext/src/untar_file.cpp @@ -156,7 +156,7 @@ void UntarFile::HandleTarBuffer(const string &buff, const string &name, FileStat info.longName.clear(); } if (realName.length() > 0 && realName[0] == '/') { - info.fullPath = realName.substr(0, realName.length() - 1); + info.fullPath = realName.substr(1, realName.length() - 1); return; } info.fullPath = realName; @@ -275,6 +275,7 @@ int UntarFile::ParseIncrementalTarFile(const string &rootPath) void UntarFile::ParseFileByTypeFlag(char typeFlag, bool &isSkip, FileStatInfo &info) { + HILOGI("untar file: %{public}s, rootPath: %{public}s", info.fullPath.c_str(), rootPath_.c_str()); switch (typeFlag) { case REGTYPE: case AREGTYPE: @@ -285,6 +286,7 @@ void UntarFile::ParseFileByTypeFlag(char typeFlag, bool &isSkip, FileStatInfo &i isSkip = false; break; case DIRTYPE: + info.fullPath = GenRealPath(rootPath_, info.fullPath); CreateDir(info.fullPath, info.mode); isSkip = false; break; @@ -305,6 +307,7 @@ void UntarFile::ParseFileByTypeFlag(char typeFlag, bool &isSkip, FileStatInfo &i int UntarFile::ParseIncrementalFileByTypeFlag(char typeFlag, bool &isSkip, FileStatInfo &info) { + HILOGI("untar file: %{public}s, rootPath: %{public}s", info.fullPath.c_str(), rootPath_.c_str()); string tmpFullPath = info.fullPath; RTrimNull(tmpFullPath); switch (typeFlag) { @@ -325,6 +328,7 @@ int UntarFile::ParseIncrementalFileByTypeFlag(char typeFlag, bool &isSkip, FileS isSkip = false; break; case DIRTYPE: + info.fullPath = GenRealPath(rootPath_, info.fullPath); CreateDir(info.fullPath, info.mode); isSkip = false; break; diff --git a/utils/src/b_json/b_report_entity.cpp b/utils/src/b_json/b_report_entity.cpp index 02fbb3c68cec1b3f66862ae3f9a008af725de97d..b43625d0db6e52ca829a4188c4eb7d8c5536db02 100644 --- a/utils/src/b_json/b_report_entity.cpp +++ b/utils/src/b_json/b_report_entity.cpp @@ -81,6 +81,7 @@ static ErrCode ParseReportInfo(struct ReportFileInfo &fileStat, } path = (path.length() > 0 && path[0] == '/') ? path.substr(1, path.length() - 1) : path; fileStat.filePath = path.substr(0, path.length() - 1); + HILOGI("Briefings file %{public}s", fileStat.filePath.c_str()); if (keys.find(INFO_MODE) != keys.end()) { fileStat.mode = residue[keys.find(INFO_MODE)->second]; }