summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--incfs/incfs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/incfs/incfs.cpp b/incfs/incfs.cpp
index e13cd81..29574c1 100644
--- a/incfs/incfs.cpp
+++ b/incfs/incfs.cpp
@@ -1611,7 +1611,8 @@ IncFsErrorCode IncFs_IsFullyLoadedByPath(const IncFsControl* control, const char
}
return isFullyLoadedV2(root, id);
}
- return isFullyLoadedSlow(openForSpecialOps(control->cmd, makeCommandPath(root, path).c_str()));
+ auto fd = ab::unique_fd(openForSpecialOps(control->cmd, makeCommandPath(root, path).c_str()));
+ return isFullyLoadedSlow(fd.get());
}
IncFsErrorCode IncFs_IsFullyLoadedById(const IncFsControl* control, IncFsFileId fileId) {
if (!control) {
@@ -1624,9 +1625,10 @@ IncFsErrorCode IncFs_IsFullyLoadedById(const IncFsControl* control, IncFsFileId
if (features() & Features::v2) {
return isFullyLoadedV2(root, fileId);
}
- return isFullyLoadedSlow(
+ auto fd = ab::unique_fd(
openForSpecialOps(control->cmd,
makeCommandPath(root, indexPath(root, fileId)).c_str()));
+ return isFullyLoadedSlow(fd.get());
}
static IncFsErrorCode isEverythingLoadedV2(const IncFsControl* control) {