/* check the file exits actually */
exist = open(path, O_RDONLY);
if(exist < 0) {
- metadata_editor_error("Not exist file");
if (errno == EACCES || errno == EPERM) {
+ metadata_editor_error("Permission denied");
return METADATA_EDITOR_ERROR_PERMISSION_DENIED;
} else {
+ metadata_editor_error("Not exist file");
return METADATA_EDITOR_ERROR_FILE_EXISTS;
}
}
/*__printRetValue("metadata_editor_create(...)",ret); */
if (ret != METADATA_EDITOR_ERROR_NONE) {
- printf("Fail metadata_editor_create() at line [%d]\n", __LINE__);
+ printf("Fail metadata_editor_create() [%d]\n", ret);
return 0;
}
/*__printRetValue("metadata_editor_set_path(...)",ret); */
if (ret != METADATA_EDITOR_ERROR_NONE) {
- printf("Fail metadata_editor_set_path() at line [%d]\n", __LINE__);
+ printf("Fail metadata_editor_set_path() [%d]\n", ret);
goto exception;
}