Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Detectors/CTF/workflow/src/CTFWriterSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ void CTFWriterSpec::init(InitContext& ic)
mChkSize = std::max(size_t(mMinSize * 1.1), mMaxSize);
if (!std::filesystem::exists(LOCKFileDir)) {
if (!std::filesystem::create_directories(LOCKFileDir)) {
usleep(10); // protection in case the directory was created by other process at the time of query
if (std::filesystem::exists(LOCKFileDir)) {
usleep(10); // protection in case the directory was being created by other process at the time of query
if (!std::filesystem::exists(LOCKFileDir)) {
throw std::runtime_error(fmt::format("Failed to create {} directory", LOCKFileDir));
}
}
Expand Down