fs/Traits: add macro PATH_LITERAL()

This commit is contained in:
Max Kellermann
2015-03-05 08:02:07 +01:00
parent 44565e22a0
commit 39c9669445
9 changed files with 18 additions and 14 deletions

View File

@@ -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\"",

View File

@@ -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\"",