Skip to content

Commit

Permalink
fix: crash by iteration on non-existing directory
Browse files Browse the repository at this point in the history
  • Loading branch information
fxliang authored and lotem committed Mar 5, 2024
1 parent edee320 commit ec2d87d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rime/lever/deployment_tasks.cc
Expand Up @@ -634,6 +634,9 @@ bool CleanOldLogFiles::Run(Deployer* deployer) {

int removed = 0;
for (const auto& dir : dirs) {
// avoid iteration on non-existing directory, which may cause error
if (!fs::exists(fs::path(dir)))
continue;
vector<path> files;
DLOG(INFO) << "temp directory: " << dir;
try {
Expand Down

0 comments on commit ec2d87d

Please sign in to comment.