Skip to content

Commit

Permalink
sources: quell a warning on newer linux distros
Browse files Browse the repository at this point in the history
  • Loading branch information
terpstra committed Apr 1, 2020
1 parent 492989f commit 6d5ec59
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,10 @@ bool chdir_workspace(const char *chdirto, std::string &wake_cwd, std::string &sr
if (attempts == 0) {
if (witlock == -1) {
return false;
} else {
} else if (fchdir(witlock) != 0 || !make_workspace(".")) {
// Attempt to auto-initialize a database
fchdir(witlock);
if (!make_workspace(".")) {
close(witlock);
return false;
}
close(witlock);
return false;
}
}

Expand Down

0 comments on commit 6d5ec59

Please sign in to comment.