File tree Expand file tree Collapse file tree 3 files changed +4
-20
lines changed
Expand file tree Collapse file tree 3 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ class DataReader {
101101 }
102102 }
103103
104- // Determine format: explicit inputFormat takes precedence, otherwise detect from extension
105- bool isCSV = (inputFormat == " csv " ) || (inputFormat == " json " ? false : FileUtils::isCsvFile (filename) );
104+ // Determine format: detect from file extension (inputFormat is only for stdin)
105+ bool isCSV = FileUtils::isCsvFile (filename);
106106
107107 if (tailLines > 0 ) {
108108 // Use tail mode
Original file line number Diff line number Diff line change 55#include < cstdlib>
66#include < sys/stat.h>
77#include < cerrno>
8-
9- #ifdef _WIN32
10- #include < direct.h>
11- #define MKDIR (path ) _mkdir(path)
12- #define RMDIR (path ) _rmdir(path)
13- #else
148#include < unistd.h>
15- #define MKDIR (path ) mkdir(path, 0755 )
16- #define RMDIR (path ) rmdir(path)
17- #endif
189
1910// Helper to create a directory
2011bool createDir (const std::string& path) {
21- return MKDIR (path.c_str ()) == 0 || errno == EEXIST;
12+ return mkdir (path.c_str (), 0755 ) == 0 || errno == EEXIST;
2213}
2314
2415// Helper to remove a file
@@ -28,7 +19,7 @@ void removeFile(const std::string& path) {
2819
2920// Helper to remove a directory
3021void removeDir (const std::string& path) {
31- RMDIR (path.c_str ());
22+ rmdir (path.c_str ());
3223}
3324
3425void test_ds18b20_error_detection () {
Original file line number Diff line number Diff line change 33#include < iostream>
44#include < fstream>
55#include < cstdio>
6-
7- #ifdef _WIN32
8- #include < direct.h>
9- #define mkdir (path, mode ) _mkdir(path)
10- #define rmdir _rmdir
11- #else
126#include < sys/stat.h>
137#include < unistd.h>
14- #endif
158
169// Helper to create temp directory structure
1710class TempTestDir {
You can’t perform that action at this time.
0 commit comments