mirror of
https://github.com/openharmony/multimedia_ringtone_library.git
synced 2026-07-01 03:23:19 -04:00
!38 change code alarm
Merge pull request !38 from caochuan/change_Code_alarm
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
namespace OHOS {
|
||||
namespace Media {
|
||||
using namespace std;
|
||||
static const mode_t MODE_RWX_USR_GRP = 02771;
|
||||
static const mode_t MODE_RW_USR = 0644;
|
||||
constexpr int STORAGE_MANAGER_MANAGER_ID = 5003;
|
||||
static const string DUALFW_SOUND_CONF_XML = "setting_system.xml";
|
||||
static std::shared_ptr<DataShare::DataShareHelper> CreateMediaDataShare(int32_t systemAbilityId)
|
||||
@@ -266,7 +266,7 @@ int32_t RingtoneDualfwRestore::DupToneFile(FileInfo &info)
|
||||
return E_ERR;
|
||||
}
|
||||
|
||||
int32_t dstFd = open(absFilePath.c_str(), O_WRONLY | O_CREAT, MODE_RWX_USR_GRP);
|
||||
int32_t dstFd = open(absFilePath.c_str(), O_WRONLY | O_CREAT, MODE_RW_USR);
|
||||
if (dstFd < 0) {
|
||||
RINGTONE_ERR_LOG("Open file failed, errno:%{public}d", errno);
|
||||
close(srcFd);
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Media {
|
||||
using namespace std;
|
||||
static const int32_t OPEN_FDS = 128;
|
||||
static const mode_t MODE_RWX_USR_GRP = 02771;
|
||||
static const mode_t MODE_RW_USR = 0644;
|
||||
const vector<string> EXIF_SUPPORTED_EXTENSION = {
|
||||
RINGTONE_CONTAINER_TYPE_MP3,
|
||||
RINGTONE_CONTAINER_TYPE_OGG
|
||||
@@ -308,7 +309,7 @@ bool RingtoneFileUtils::CopyFileUtil(const string &filePath, const string &newPa
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t dest = open(newPath.c_str(), O_WRONLY | O_CREAT, MODE_RWX_USR_GRP);
|
||||
int32_t dest = open(newPath.c_str(), O_WRONLY | O_CREAT, MODE_RW_USR);
|
||||
if (dest == -1) {
|
||||
RINGTONE_ERR_LOG("Open failed for destination file %{public}d", errno);
|
||||
close(source);
|
||||
|
||||
Reference in New Issue
Block a user