Skip to content

Commit a48263a

Browse files
committed
Revert "fix: export to UTF-8 filenames (#265)"
This reverts commit ed02002.
1 parent 68e1cb5 commit a48263a

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/tkscid.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include "ui.h"
4545
#include <algorithm>
4646
#include <cstring>
47-
#include <filesystem>
4847
#include <numeric>
4948
#include <set>
5049
#include <unordered_map>
@@ -457,11 +456,7 @@ sc_base_export (ClientData, Tcl_Interp * ti, int argc, const char ** argv)
457456
return InvalidCommand (ti, "sc_base export", options);
458457
}
459458
}
460-
461-
const auto tcl_strings_are_utf8 =
462-
std::filesystem::path((const char8_t*)argv[4]).string();
463-
const auto exportFileName = tcl_strings_are_utf8.c_str();
464-
auto exportFile = fopen (exportFileName, (appendToFile ? "r+" : "w"));
459+
auto exportFile = fopen(argv[4], (appendToFile ? "r+" : "w"));
465460
if (exportFile == NULL) {
466461
return errorResult (ti, "Error opening file for exporting games.");
467462
}
@@ -1841,10 +1836,7 @@ sc_filter_old(ClientData cd, Tcl_Interp * ti, int argc, const char ** argv)
18411836

18421837
case FILTER_EXPORT:
18431838
if (argc >= 7 && argc <=9) {
1844-
const auto tcl_strings_are_utf8 =
1845-
std::filesystem::path((const char8_t*)argv[5]).string();
1846-
const auto exportFileName = tcl_strings_are_utf8.c_str();
1847-
auto exportFile = fopen(exportFileName, "wb");
1839+
FILE* exportFile = fopen(argv[5], "wb");
18481840
if (exportFile == NULL) return errorResult (ti, "Error opening file for exporting games.");
18491841
auto old_language = language;
18501842
Game g;

0 commit comments

Comments
 (0)