Snap for 9264775 from a1e2858cb842b473b6ac98bb499a15aafaae0f36 to udc-release
Change-Id: Ic25ae8854747967664a5875903af250bf1f9c816
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 @@
}
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 @@
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) {