Change maximum length of filepath to PATH_MAX 37/68637/4
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 9 May 2016 05:20:50 +0000 (14:20 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 10 May 2016 07:29:11 +0000 (00:29 -0700)
When length of file name is reaches 256,
package which has it failed to install due to it.
So set maximum length of filepath higher than
maximum filename length to prevent it.

Change-Id: I45465ace401feaecc60dfa0c7ba9e1e703a44b13
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/common/utils/file_util.cc

index ab41463..e996614 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <fcntl.h>
 #include <sys/stat.h>
+#include <linux/limits.h>
 #include <unzip.h>
 #include <zlib.h>
 
@@ -27,7 +28,7 @@ namespace bf = boost::filesystem;
 namespace {
 
 unsigned kZipBufSize = 8_kB;
-unsigned kZipMaxPath = 256;
+unsigned kZipMaxPath = PATH_MAX;
 
 int64_t GetBlockSizeForPath(const bf::path& path_in_partition) {
   struct stat stats;