Fallback to lstat() if readdir() fails to give type in reference checking 22/67822/3
authorTomasz Iwanek <t.iwanek@samsung.com>
Thu, 28 Apr 2016 09:13:09 +0000 (11:13 +0200)
committersangwan kwon <sangwan.kwon@samsung.com>
Wed, 11 May 2016 09:51:01 +0000 (02:51 -0700)
commitb9024fb9edc20217b9367f53274fecad793985c5
tree1cc9b713293dded4b0c57f53b9e4bdcfbb39e9b7
parent19dab0b3e4cb24cbd529e7ec8be29f4212e968d1
Fallback to lstat() if readdir() fails to give type in reference checking

Some filesytem types may not set d_type field to indicate
the type of directory entry. This code adds workaround to
try to stat file if directory entry type is unknown.

This will be basicly needed to check file references when
we are using tzip filesystem for storing tizen package
files. Although tzip implements readdir(), it is not
setting d_type. Correct behaviour of caller is to handle
value DT_UNKNOWN.

Change-Id: I45642ae5d50a3d3f3fbc09e41f54e4a118037e1d
vcore/vcore/ReferenceValidator.cpp
vcore/vcore/ReferenceValidator.h