[Service][Routing API] Set file mode as 'rw' default 62/239162/4 submit/tizen/20200723.045512 submit/tizen/20200724.012145
authorDongHyun Song <dh81.song@samsung.com>
Wed, 22 Jul 2020 07:58:12 +0000 (16:58 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Wed, 22 Jul 2020 08:03:40 +0000 (17:03 +0900)
If mode is not given by application, undefined 'mode' value throws
exception in tizen.filesystem.resolve() due to type mismatching.

According to its default file mode, this patch set it 'rw'

in file_system_manager.js

function resolve() {
...
    if (!args.has.mode) {
        args.mode = 'rw';

Change-Id: I18b44c61c53c1683438a65e88f1ebde50263288a
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/service/device_api_router.ts

index e7f66c8..f040e4c 100644 (file)
@@ -96,7 +96,7 @@ export class DeviceAPIRouter {
       console.log(`Routing - resolve(${location})`);
       let service_id = this.GetServiceId();
       location = wrt.resolveVirtualRoot(service_id, location);
-      this.funcPathResolve(location, onSuccess, onError, mode);
+      this.funcPathResolve(location, onSuccess, onError, mode ?? 'rw');
     }
   }
 }
\ No newline at end of file