summaryrefslogtreecommitdiff
path: root/source/fud_directory.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-15 20:56:26 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-15 20:56:26 -0500
commitf3ac764684c64fbdd2094853a80b23e570cd5d9c (patch)
tree3b7f64480a1247455d28e23b6bb5ff63303c9170 /source/fud_directory.cpp
parent71976e927cca43b970cb659c03fd6908c352ea3d (diff)
Conver to using static constructors for string, sqlite, files.
Diffstat (limited to 'source/fud_directory.cpp')
-rw-r--r--source/fud_directory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/fud_directory.cpp b/source/fud_directory.cpp
index 1fcebe1..1697692 100644
--- a/source/fud_directory.cpp
+++ b/source/fud_directory.cpp
@@ -199,13 +199,16 @@ Result<std::optional<DirectoryEntry>, FudStatus> Directory::getNextEntry()
return RetType::error(m_status);
}
- auto entryName = String{entryNameCString};
- auto retValue = DirectoryEntry::fromStat(entryName, sBuffer);
+ auto entryNameResult = String::makeFromCString(entryNameCString);
+ if (entryNameResult.isError()) {
+ return RetType::error(entryNameResult);
+ }
+ auto retValue = DirectoryEntry::fromStat(entryNameResult.getOkay(), sBuffer);
if (retValue.isOkay()) {
m_errorCode = 0;
m_status = FudStatus::Success;
- return RetType::okay(std::move(retValue.getOkay()));
+ return RetType::okay(retValue.takeOkay());
}
m_status = retValue.getError();