Add logs for opening file 73/221473/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 3 Jan 2020 01:49:46 +0000 (10:49 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 3 Jan 2020 06:53:40 +0000 (15:53 +0900)
Change-Id: Ie1e88bd867def7d98dacf2b5a161e8fb3a54aacd
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
server/stickerd_data_manager.c

index f7a1e7b..486e929 100644 (file)
@@ -400,7 +400,14 @@ static int _file_copy(const char *src, const char *dest)
 
     memset(buf, '\0', 4096);
     fd = open(src, O_RDONLY);
+    if (fd == -1) {
+        LOGE("Failed to open file (%s) for reading", src);
+    }
+
     n_fd = open(dest, O_WRONLY | O_CREAT | O_TRUNC, 0755);
+    if (n_fd == -1) {
+        LOGE("Failed to open file (%s) for writing", dest);
+    }
 
     if (fd == -1 || n_fd == -1) {
         tmp_err = errno;