fs/Traits: add macro PATH_LITERAL()
This commit is contained in:
@@ -71,7 +71,7 @@ daemonize_kill(void)
|
||||
if (pidfile.IsNull())
|
||||
FatalError("no pid_file specified in the config file");
|
||||
|
||||
fp = FOpen(pidfile, "r");
|
||||
fp = FOpen(pidfile, PATH_LITERAL("r"));
|
||||
if (fp == nullptr) {
|
||||
const std::string utf8 = pidfile.ToUTF8();
|
||||
FormatFatalSystemError("Unable to open pid file \"%s\"",
|
||||
|
@@ -37,7 +37,7 @@ public:
|
||||
if (path.IsNull())
|
||||
return;
|
||||
|
||||
file = FOpen(path, "w");
|
||||
file = FOpen(path, FOpenMode::WriteText);
|
||||
if (file == nullptr) {
|
||||
const std::string utf8 = path.ToUTF8();
|
||||
FormatFatalSystemError("Failed to create pid file \"%s\"",
|
||||
|
Reference in New Issue
Block a user