Skip to content

Commit 1127a27

Browse files
committed
Fixing MegaLinter error:
replacing filesystem function by ifstream
1 parent c29d9fc commit 1127a27

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

PWGCF/FemtoDream/Utils/femtoDreamCutCulator.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ using namespace o2::analysis::femtoDream;
2929
int main(int /*argc*/, char* argv[])
3030
{
3131
std::string configFileName(argv[1]);
32-
std::filesystem::path configFile{configFileName};
33-
34-
if (std::filesystem::exists(configFile)) {
32+
std::ifstream configFile(configFileName);
33+
34+
if (configFile.is_open()) {
3535
FemtoDreamCutculator cut;
3636
cut.init(argv[1]);
3737

@@ -97,7 +97,8 @@ int main(int /*argc*/, char* argv[])
9797

9898
} else {
9999
std::cout << "The configuration file " << configFileName
100-
<< " could not be found.";
100+
<< " could not be found or could not be opened.";
101+
return 1;
101102
}
102103

103104
return 0;

PWGCF/FemtoDream/Utils/femtoDreamCutCulator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#ifndef PWGCF_FEMTODREAM_UTILS_FEMTODREAMCUTCULATOR_H_
1919
#define PWGCF_FEMTODREAM_UTILS_FEMTODREAMCUTCULATOR_H_
2020

21-
#include <filesystem>
2221
#include <bitset>
2322
#include <functional>
2423
#include <iostream>

0 commit comments

Comments
 (0)