summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/media-thumbnail.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index 9a3b02a..be1b09a 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -83,11 +83,13 @@ int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_
/* check the file exits actually */
exist = open(origin_path, O_RDONLY);
if (exist < 0) {
- thumb_err("Fail to open original_path[%s]", origin_path);
- if (errno == EACCES || errno == EPERM)
+ if (errno == EACCES || errno == EPERM) {
+ thumb_err("Fail to open original_path[%s]: Permission Denied", origin_path);
return MS_MEDIA_ERR_PERMISSION_DENIED;
- else
+ } else {
+ thumb_err("Fail to open original_path[%s]: Invalid Path", origin_path);
return MS_MEDIA_ERR_INVALID_PARAMETER;
+ }
}
close(exist);