archive/Lookup: return AllocatedPath
This commit is contained in:
@@ -53,7 +53,7 @@ archive_lookup(PathTraitsFS::pointer_type pathname)
|
||||
//its a file ?
|
||||
if (file_info.IsRegular()) {
|
||||
//so the upper should be file
|
||||
return {Path::FromFS(pathname), Path::FromFS(slash + 1)};
|
||||
return {AllocatedPath::FromFS(pathname), AllocatedPath::FromFS(slash + 1)};
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
|
@@ -20,13 +20,13 @@
|
||||
#ifndef MPD_ARCHIVE_LOOKUP_HXX
|
||||
#define MPD_ARCHIVE_LOOKUP_HXX
|
||||
|
||||
#include "fs/Path.hxx"
|
||||
#include "fs/AllocatedPath.hxx"
|
||||
|
||||
struct ArchiveLookupResult {
|
||||
Path archive = nullptr;
|
||||
Path inside = nullptr;
|
||||
AllocatedPath archive = nullptr;
|
||||
AllocatedPath inside = nullptr;
|
||||
|
||||
constexpr operator bool() const noexcept {
|
||||
operator bool() const noexcept {
|
||||
return !archive.IsNull();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user