fix usb mount read-only ,no content display 48/178248/2
authorchen89.chen <chen89.chen@samsung.com>
Wed, 9 May 2018 04:12:51 +0000 (12:12 +0800)
committerchen89.chen <chen89.chen@samsung.com>
Wed, 9 May 2018 04:18:05 +0000 (12:18 +0800)
Change-Id: Ief9932eaacdea08fd98b24c2249e0cc76a8adc9b

packaging/media-server.spec
src/common/media-common-external-storage.c

index b4bc814..3d1711f 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       media-server
 Summary:    A server for media content management
-Version:    0.3.65
+Version:    0.3.66
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0
index 322900a..579cad7 100755 (executable)
@@ -113,7 +113,12 @@ int ms_write_device_info(const char *root_path, char *device_uuid)
        fp = fopen(path, "wt");
        if (fp == NULL) {
                MS_DBG_ERR("fp is NULL. file name : %s", path);
-               return MS_MEDIA_ERR_FILE_OPEN_FAIL;
+               if (errno == EROFS) {
+                       MS_DBG_STRERROR("read-only mode");
+                       return MS_MEDIA_ERR_NONE;
+               } else {
+                       return MS_MEDIA_ERR_FILE_OPEN_FAIL;
+               }
        }
 
        fclose(fp);