Fix a bug on checking symbolic link file 93/140793/1 accepted/tizen/4.0/unified/20170816.011612 accepted/tizen/4.0/unified/20170816.014825 accepted/tizen/unified/20170726.140010 submit/tizen/20170726.095304 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0_unified/20170814.115522
authorchanywa <cbible.kim@samsung.com>
Wed, 26 Jul 2017 09:51:28 +0000 (18:51 +0900)
committerchanywa <cbible.kim@samsung.com>
Wed, 26 Jul 2017 09:51:28 +0000 (18:51 +0900)
Change-Id: I5f21102f1e25f5937151a01bb939c4b1886e0887

src/api/maps_view_snapshot.cpp

index de6e07a..b73842a 100644 (file)
@@ -69,11 +69,7 @@ static bool __encode_bitmap_file(const void *data, int width, int height, const
        } bmp_dib_v3_header_t = { 0x28, 0, 0, 1, 24, 0, 0, 0, 0, 0, 0 };
 
        struct stat file_info;
-       if (0 != lstat(file, &file_info)) {
-               MAPS_LOGE("lstat failed"); //LCOV_EXCL_LINE
-               return false;
-       }
-       if (S_ISLNK(file_info.st_mode)) {
+       if (lstat(file, &file_info) == 0 && S_ISLNK(file_info.st_mode)) {
                MAPS_LOGE("symbolic linked file"); //LCOV_EXCL_LINE
                return false;
        }