Fixed JSF-149 errors detected by C++Test.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Mon, 28 Sep 2015 13:52:53 +0000 (15:52 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Mon, 28 Sep 2015 13:52:53 +0000 (15:52 +0200)
Octal values replaced by constants.

[Verification] Code compiles, TCT pass rate did not change.

Change-Id: If3ec7230b28500e2220cffee279aed50c11c041d
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/archive/un_zip_extract_request.cc

index b3018da4f6630caec0a46a317b3fc13758f6d3dd..2498d6e11ffe8df0cc62d8bb558ccaa72a60cf63 100755 (executable)
@@ -96,7 +96,7 @@ void createMissingDirectories(const std::string& path, bool check_first = true)
 
             if(FPS_DIRECTORY != status) {
                 //TODO investigate 0775 (mode) - filesystem assumed that file should have parent mode
-                if(mkdir(left_part.c_str(), 0775) == -1) {
+                if(mkdir(left_part.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
                     LoggerE("Couldn't create new directory: %s errno: %s",
                             left_part.c_str(), GetErrorString(errno).c_str());
                //TODO check why mkdir return -1 but directory is successfully created
@@ -306,7 +306,7 @@ PlatformResult UnZipExtractRequest::handleDirectoryEntry()
         }
 
         //Try to create new directory in output directory
-        if(mkdir(m_new_dir_path.c_str(), 0775) == -1) {
+        if(mkdir(m_new_dir_path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
             LoggerE("Couldn't create new directory: %s errno: %s",
                     m_new_dir_path.c_str(), GetErrorString(errno).c_str());
             return PlatformResult(ErrorCode::UNKNOWN_ERR, "Could not create new directory in extract output directory");
@@ -343,7 +343,7 @@ PlatformResult UnZipExtractRequest::prepareOutputSubdirectory()
 
         //Try to create new directory in output directory
         //TODO investigate 0775 (mode) - filesystem assumed that file should have parent mode
-        if(mkdir(m_new_dir_path.c_str(), 0775) == -1) {
+        if(mkdir(m_new_dir_path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
             LoggerW("couldn't create new directory: %s errno: %s",
                     m_new_dir_path.c_str(), GetErrorString(errno).c_str());
             //TODO check why mkdir return -1 but directory is successfully created