Fixes for windows
This commit is contained in:
parent
be6599807d
commit
dec05988f4
1 changed files with 9 additions and 2 deletions
|
@ -78,9 +78,16 @@ std::string App::GetDataPath() {
|
||||||
CHECK(PathService::Get(base::DIR_APP_DATA, &path));
|
CHECK(PathService::Get(base::DIR_APP_DATA, &path));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
base::FilePath dataPath = path.Append(base::FilePath::FromUTF8Unsafe(Browser::Get()->GetName()));
|
base::FilePath data_path = path.Append(
|
||||||
|
base::FilePath::FromUTF8Unsafe(Browser::Get()->GetName()));
|
||||||
|
|
||||||
return dataPath.value();
|
// FilePath.value() returns a std::wstring in windows and
|
||||||
|
// std::string on other platforms.
|
||||||
|
std::vector<char> writable(data_path.value().begin(),
|
||||||
|
data_path.value().end());
|
||||||
|
writable.push_back('\0');
|
||||||
|
|
||||||
|
return &writable[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
|
mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue