Compare commits
1 Commits
d1ebc32f9d
...
33efadaeab
| Author | SHA1 | Date | |
|---|---|---|---|
| 33efadaeab |
@@ -23,7 +23,7 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// New API
|
||||
|
||||
TL_DECLARE_INTEGRAL_ID(PackId, uint64_t, 0)
|
||||
TL_DECLARE_INTEGRAL_ID(PackId, uint64_t)
|
||||
|
||||
tl::result<PackId> mountFront(AbsPath mountPoint, tl::unique_ref<IPack> pack);
|
||||
tl::result<PackId> mountBack(AbsPath mountPoint, tl::unique_ref<IPack> pack);
|
||||
@@ -74,8 +74,9 @@ private:
|
||||
tl::unique_ref<IPack> pack;
|
||||
AbsPath mountPoint;
|
||||
|
||||
explicit PackData(tl::unique_ref<IPack>&& pack) noexcept
|
||||
explicit PackData(tl::unique_ref<IPack>&& pack, PackId i_packId) noexcept
|
||||
: pack(std::move(pack))
|
||||
, id(i_packId)
|
||||
{}
|
||||
|
||||
PackData(PackData&& other) noexcept = default;
|
||||
|
||||
@@ -575,7 +575,6 @@ void CustomFilesystem::convertToPackPath(AbsPath& packPath, const AbsPath& path,
|
||||
|
||||
tl::result<CustomFilesystem::PackId> CustomFilesystem::mount(AbsPath mountPoint, tl::unique_ref<IPack> pack, MountPolicy policy)
|
||||
{
|
||||
PackData data(std::move(pack));
|
||||
|
||||
if (!mountPoint.is_valid())
|
||||
return tl::make_generic_error("Invalid mount point");
|
||||
@@ -585,7 +584,7 @@ tl::result<CustomFilesystem::PackId> CustomFilesystem::mount(AbsPath mountPoint,
|
||||
return tl::make_generic_error("Invalid shadowing (mount point shadowing a file)");
|
||||
|
||||
const PackId id(++s_lastId);
|
||||
data.id = id;
|
||||
PackData data(std::move(pack), id);
|
||||
data.mountPoint = std::move(mountPoint);
|
||||
|
||||
switch (policy)
|
||||
|
||||
Reference in New Issue
Block a user