mirror of
https://gitee.com/openharmony/hiviewdfx_hitrace
synced 2024-11-27 01:50:45 +00:00
commit
5c0d84eeaa
@ -1266,7 +1266,6 @@ void SetCmdTraceIntParams(const std::string &traceParamsStr, int &traceParams)
|
||||
if (traceParams <= 0) {
|
||||
HILOG_WARN(LOG_CORE, "Illegal input, traceParams initialized to null.");
|
||||
traceParams = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,8 +153,9 @@ void DelSnapshotTraceFile(const bool deleteSavedFmt, const int keepFileCount)
|
||||
return a.ctime < b.ctime;
|
||||
});
|
||||
|
||||
int deleteFileCnt = snapshotTraceFiles.size() - keepFileCount;
|
||||
for (int i = 0; i < deleteFileCnt && i < snapshotTraceFiles.size(); i++) {
|
||||
int snapshotTraceFilesSize = static_cast<int>(snapshotTraceFiles.size());
|
||||
int deleteFileCnt = snapshotTraceFilesSize - keepFileCount;
|
||||
for (int i = 0; i < deleteFileCnt && i < snapshotTraceFilesSize; i++) {
|
||||
RemoveFile(TRACE_DEFAULT_DIR + snapshotTraceFiles[i].filename);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user