aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PlaylistFile.cxx')
-rw-r--r--src/PlaylistFile.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index e7dae6258..3f9845166 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -26,7 +26,7 @@
#include "DatabaseGlue.hxx"
#include "Song.hxx"
#include "Mapper.hxx"
-#include "TextFile.hxx"
+#include "fs/TextFile.hxx"
#include "ConfigGlobal.hxx"
#include "ConfigOption.hxx"
#include "ConfigDefaults.hxx"
@@ -43,10 +43,7 @@
#include <glib.h>
#include <assert.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
#include <string.h>
#include <errno.h>
@@ -159,10 +156,9 @@ LoadPlaylistFileInfo(PlaylistInfo &info,
if (!StatFile(path_fs, st) || !S_ISREG(st.st_mode))
return false;
- char *name = g_strndup(name_fs_str,
- name_length + 1 - sizeof(PLAYLIST_FILE_SUFFIX));
- std::string name_utf8 = PathToUTF8(name);
- g_free(name);
+ std::string name(name_fs_str,
+ name_length + 1 - sizeof(PLAYLIST_FILE_SUFFIX));
+ std::string name_utf8 = PathToUTF8(name.c_str());
if (name_utf8.empty())
return false;
@@ -250,7 +246,7 @@ LoadPlaylistFile(const char *utf8path, Error &error)
if (!uri_has_scheme(s)) {
uri_utf8 = map_fs_to_utf8(s);
if (uri_utf8.empty()) {
- if (PathTraits::IsAbsoluteFS(s)) {
+ if (PathTraitsFS::IsAbsolute(s)) {
uri_utf8 = PathToUTF8(s);
if (uri_utf8.empty())
continue;