+ if (deleteSource)
+ {
+ unique_ptr<char[]> pContentPath(_StringConverter::CopyToCharArrayN(sourcePath));
+ SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY, "[%s] pContentPath is null.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ r = _FileImpl::Remove(sourcePath);
+ SysTryCatch(NID_CNT, !IsFailed(r), , r, "[%s] Failed to perform Remove operation.", GetErrorMessage(r));
+
+ val = media_content_scan_file(pContentPath.get());
+ SysTryLog(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, "Failed to perform media_content_scan_file[%d].", val);
+ }
+