summaryrefslogtreecommitdiff
path: root/src/Util/InstallerUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Util/InstallerUtil.cpp')
-rwxr-xr-xsrc/Util/InstallerUtil.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Util/InstallerUtil.cpp b/src/Util/InstallerUtil.cpp
index b668d30..4caa238 100755
--- a/src/Util/InstallerUtil.cpp
+++ b/src/Util/InstallerUtil.cpp
@@ -92,7 +92,7 @@ InstallerUtil::Remove(const Tizen::Base::String& filePath)
bool
InstallerUtil::Copy(const String& srcFilePath, const String& destFilePath)
{
- const int bufSize = 4096;
+ int bufSize = 4096;
int readBytes = 0;
result r = E_SUCCESS;
@@ -101,7 +101,7 @@ InstallerUtil::Copy(const String& srcFilePath, const String& destFilePath)
File srcFile;
File destFile;
- std::unique_ptr<char[]> pBuf(new char[bufSize]);
+ std::unique_ptr<char[]> pBuf(new (std::nothrow) char[bufSize]);
TryReturn(pBuf, false, "[osp-installer] pBuf is null");
r = srcFile.Construct(srcFilePath, L"r");
@@ -131,7 +131,7 @@ InstallerUtil::CopyDirectory(const String& srcFilePath, const String& destFilePa
AppLogTag(OSP_INSTALLER, "+ CopyDirectory(): src=[%ls], dest=[%ls]", srcFilePath.GetPointer(), destFilePath.GetPointer());
- std::unique_ptr<Directory> pDir(new Directory);
+ std::unique_ptr<Directory> pDir(new (std::nothrow) Directory);
TryReturn(pDir, false, "[osp-installer] pDir is null.");
r = pDir->Construct(srcFilePath);
@@ -287,7 +287,7 @@ InstallerUtil::ChangeDirectoryPermission(const String& filePath, int mode)
return true;
}
- std::unique_ptr<Directory> pDir(new Directory);
+ std::unique_ptr<Directory> pDir(new (std::nothrow) Directory);
TryReturn(pDir, false, "[osp-installer] pDir is null.");
r = pDir->Construct(filePath);