fs/Path: add method IsAbsolute()
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "InputPlugin.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <glib.h>
|
||||
@@ -49,7 +50,7 @@ input_archive_open(const char *pathname,
|
||||
char *archive, *filename, *suffix, *pname;
|
||||
struct input_stream *is;
|
||||
|
||||
if (!g_path_is_absolute(pathname))
|
||||
if (!Path::IsAbsoluteFS(pathname))
|
||||
return NULL;
|
||||
|
||||
pname = g_strdup(pathname);
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "InputPlugin.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
#include "system/fd_util.h"
|
||||
#include "open.h"
|
||||
|
||||
@@ -62,7 +63,7 @@ input_file_open(const char *filename,
|
||||
int fd, ret;
|
||||
struct stat st;
|
||||
|
||||
if (!g_path_is_absolute(filename))
|
||||
if (!Path::IsAbsoluteFS(filename))
|
||||
return nullptr;
|
||||
|
||||
fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0);
|
||||
|
Reference in New Issue
Block a user