Fix the gadget path 97/306297/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 19 Feb 2024 23:23:46 +0000 (08:23 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 19 Feb 2024 23:26:56 +0000 (08:26 +0900)
The gadget path must contain a resource type to facilitate mounting.
After this patch is applied, the gadget path will be
"/<package root path>/res/allowed/<res-type>/".

Change-Id: Iaf4681a67a85d963f2776b8b2a63326882925fae
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/res_info/res_mount_package_info.cc

index f126248..c0d39e3 100644 (file)
@@ -39,7 +39,8 @@ ResMountPackageInfo::ResMountPackageInfo(
     if (pkg->GetResType().length() > strlen(kGadgetPrefix) &&
         !pkg->GetResType().compare(0, strlen(kGadgetPrefix), kGadgetPrefix)) {
       gadget_pkgids_.insert(pkg->GetPkgId());
-      gadget_paths_.emplace_back(pkg->GetRootPath() + ALLOWED_SUFFIX);
+      gadget_paths_.emplace_back(pkg->GetRootPath() + ALLOWED_SUFFIX + "/" +
+                                 pkg->GetResType());
     }
 
     if (pkg->IsLib())