ConfigFile, CommandLine: use the Path class

This commit is contained in:
Max Kellermann
2013-01-29 17:23:35 +01:00
parent eb8922f346
commit feb8d5b82f
12 changed files with 96 additions and 72 deletions

View File

@@ -22,7 +22,7 @@
#include "Directory.hxx"
#include "Mapper.hxx"
#include "fs/Path.hxx"
#include "glib_compat.h"
#include "fs/FileSystem.hxx"
#include <glib.h>
@@ -68,12 +68,10 @@ directory_exists(const Directory *directory)
/* invalid path: cannot exist */
return false;
GFileTest test = directory->device == DEVICE_INARCHIVE ||
return directory->device == DEVICE_INARCHIVE ||
directory->device == DEVICE_CONTAINER
? G_FILE_TEST_IS_REGULAR
: G_FILE_TEST_IS_DIR;
return g_file_test(path_fs.c_str(), test);
? FileExists(path_fs)
: DirectoryExists(path_fs);
}
bool