Skip to content

Commit 6c0bab6

Browse files
committed
convert paths to string
fixes error: cannot convert ‘std::filesystem::__cxx11::path’ to ‘const agi::fs::path&’
1 parent 3993398 commit 6c0bab6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libaegisub/unix/path.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace sfs = std::filesystem;
2424

2525
namespace {
26-
std::string home_dir() {
26+
sfs::path home_dir() {
2727
const char *env = getenv("HOME");
2828
if (env) return env;
2929

@@ -55,20 +55,20 @@ sfs::path data_dir() {
5555

5656
namespace agi {
5757
void Path::FillPlatformSpecificPaths() {
58-
sfs::path home = home_dir();
59-
SetToken("?user", home/".aegisub");
60-
SetToken("?local", home/".aegisub");
58+
sfs::path dotdir = home_dir()/".aegisub";
59+
SetToken("?user", dotdir.string());
60+
SetToken("?local", dotdir.string());
6161

6262
#ifdef APPIMAGE_BUILD
6363
sfs::path data = data_dir();
64-
if (data == "") data = home/".aegisub";
65-
SetToken("?data", data);
64+
if (data == "") data = dotdir.string();
65+
SetToken("?data", data.string());
6666
SetToken("?dictionary", Decode("?data/dictionaries"));
6767
#else
6868
SetToken("?data", P_DATA);
6969
SetToken("?dictionary", "/usr/share/hunspell");
7070
#endif
7171

72-
SetToken("?temp", sfs::temp_directory_path());
72+
SetToken("?temp", sfs::temp_directory_path().string());
7373
}
7474
}

0 commit comments

Comments
 (0)