io, net, evnet: quote file names in error messages
This commit is contained in:

committed by
Max Kellermann

parent
b3a31b69ee
commit
1e4bf90c60
@@ -12,7 +12,7 @@ OpenReadOnly(const char *path, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(path, O_RDONLY|flags))
|
||||
throw FmtErrno("Failed to open '{}'", path);
|
||||
throw FmtErrno("Failed to open {:?}", path);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ OpenWriteOnly(const char *path, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(path, O_WRONLY|flags))
|
||||
throw FmtErrno("Failed to open '{}'", path);
|
||||
throw FmtErrno("Failed to open {:?}", path);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ OpenDirectory(const char *path, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(path, O_DIRECTORY|O_RDONLY|flags))
|
||||
throw FmtErrno("Failed to open '{}'", path);
|
||||
throw FmtErrno("Failed to open {:?}", path);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ OpenPath(const char *path, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(path, O_PATH|flags))
|
||||
throw FmtErrno("Failed to open '{}'", path);
|
||||
throw FmtErrno("Failed to open {:?}", path);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ OpenPath(FileDescriptor directory, const char *name, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(directory, name, O_PATH|flags))
|
||||
throw FmtErrno("Failed to open '{}'", name);
|
||||
throw FmtErrno("Failed to open {:?}", name);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ OpenReadOnly(FileDescriptor directory, const char *name, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(directory, name, O_RDONLY|flags))
|
||||
throw FmtErrno("Failed to open '{}'", name);
|
||||
throw FmtErrno("Failed to open {:?}", name);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ OpenWriteOnly(FileDescriptor directory, const char *name, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(directory, name, O_WRONLY|flags))
|
||||
throw FmtErrno("Failed to open '{}'", name);
|
||||
throw FmtErrno("Failed to open {:?}", name);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ OpenDirectory(FileDescriptor directory, const char *name, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.Open(directory, name, O_DIRECTORY|O_RDONLY|flags))
|
||||
throw FmtErrno("Failed to open '{}'", name);
|
||||
throw FmtErrno("Failed to open {:?}", name);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user