aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateIO.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:59:35 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 23:43:46 +0200
commitabfbd55305587306730d5419b8a3b09e6a43abcb (patch)
tree2a195220d79efe195f3beacb7dd3a226a3341ad6 /src/UpdateIO.cxx
parentb3611524f45c2a478f9decd6d22ecd1dbbbb64b9 (diff)
downloadmpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.gz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.xz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.zip
fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being responsible for allocation/deallocation. The FileSystem.hxx library accepts Path arguments instead of AllocatedPath, to avoid forcing callers to allocate another string object.
Diffstat (limited to 'src/UpdateIO.cxx')
-rw-r--r--src/UpdateIO.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/UpdateIO.cxx b/src/UpdateIO.cxx
index ba4fcb7cf..14c25249f 100644
--- a/src/UpdateIO.cxx
+++ b/src/UpdateIO.cxx
@@ -22,7 +22,7 @@
#include "src/UpdateDomain.hxx"
#include "Directory.hxx"
#include "Mapper.hxx"
-#include "fs/Path.hxx"
+#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "Log.hxx"
@@ -32,7 +32,7 @@
int
stat_directory(const Directory *directory, struct stat *st)
{
- const Path path_fs = map_directory_fs(directory);
+ const auto path_fs = map_directory_fs(directory);
if (path_fs.IsNull())
return -1;
@@ -51,7 +51,7 @@ int
stat_directory_child(const Directory *parent, const char *name,
struct stat *st)
{
- const Path path_fs = map_directory_child_fs(parent, name);
+ const auto path_fs = map_directory_child_fs(parent, name);
if (path_fs.IsNull())
return -1;
@@ -69,7 +69,7 @@ stat_directory_child(const Directory *parent, const char *name,
bool
directory_exists(const Directory *directory)
{
- const Path path_fs = map_directory_fs(directory);
+ const auto path_fs = map_directory_fs(directory);
if (path_fs.IsNull())
/* invalid path: cannot exist */
return false;
@@ -84,7 +84,7 @@ bool
directory_child_is_regular(const Directory *directory,
const char *name_utf8)
{
- const Path path_fs = map_directory_child_fs(directory, name_utf8);
+ const auto path_fs = map_directory_child_fs(directory, name_utf8);
if (path_fs.IsNull())
return false;
@@ -102,7 +102,7 @@ directory_child_access(const Directory *directory,
(void)mode;
return true;
#else
- const Path path = map_directory_child_fs(directory, name);
+ const auto path = map_directory_child_fs(directory, name);
if (path.IsNull())
/* something went wrong, but that isn't a permission
problem */