// Create the directory if requested by the caller. Do this before resolving
// `file_path` to an absolute path because on POSIX, MakeAbsoluteFilePath
// requires that the path exists.
- if (create && !CreateDirectory(file_path)) {
+ if (create &&
+#if BUILDFLAG(IS_EFL)
+ !PathExists(file_path) &&
+#endif
+ !CreateDirectory(file_path)) {
return false;
}
void ContentMainDelegateEfl::PreSandboxStartupBrowser() {
- LocaleEfl::Initialize();
- base::PathService::Override(base::FILE_EXE, base::FilePath(SubProcessPath()));
- base::PathService::Override(base::FILE_MODULE,
- base::FilePath(SubProcessPath()));
+ if (!base::PathService::Override(base::FILE_EXE,
+ base::FilePath(SubProcessPath())) ||
+ !base::PathService::Override(base::FILE_MODULE,
+ base::FilePath(SubProcessPath()))) {
+ LOG(ERROR) << " failed to override path for efl port ";
+ return;
+ }
+ LocaleEfl::Initialize();
InitializeUserDataDir();
InitializeDiskCacheDir();