Skip to content

Commit

Permalink
convert paths to string
Browse files Browse the repository at this point in the history
fixes error: cannot convert ‘std::filesystem::__cxx11::path’ to ‘const agi::fs::path&’
  • Loading branch information
darealshinji committed Jan 1, 2025
1 parent 3993398 commit 6c0bab6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libaegisub/unix/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace sfs = std::filesystem;

namespace {
std::string home_dir() {
sfs::path home_dir() {
const char *env = getenv("HOME");
if (env) return env;

Expand Down Expand Up @@ -55,20 +55,20 @@ sfs::path data_dir() {

namespace agi {
void Path::FillPlatformSpecificPaths() {
sfs::path home = home_dir();
SetToken("?user", home/".aegisub");
SetToken("?local", home/".aegisub");
sfs::path dotdir = home_dir()/".aegisub";
SetToken("?user", dotdir.string());
SetToken("?local", dotdir.string());

#ifdef APPIMAGE_BUILD
sfs::path data = data_dir();
if (data == "") data = home/".aegisub";
SetToken("?data", data);
if (data == "") data = dotdir.string();
SetToken("?data", data.string());
SetToken("?dictionary", Decode("?data/dictionaries"));
#else
SetToken("?data", P_DATA);
SetToken("?dictionary", "/usr/share/hunspell");
#endif

SetToken("?temp", sfs::temp_directory_path());
SetToken("?temp", sfs::temp_directory_path().string());
}
}

0 comments on commit 6c0bab6

Please sign in to comment.