devicemapper: Skip the files with prefix "." during device map construction

Any file which starts with "." is not a valid metadata file. Skip it
during device map construction.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 080a6f1e4b7c33ce9b7b1b90cbf8fd90658226c2
Component: engine
This commit is contained in:
Vivek Goyal
2015-01-29 13:19:18 -05:00
parent dad1ed7610
commit 7556ae9236
@@ -323,6 +323,11 @@ func (devices *DeviceSet) deviceFileWalkFunction(path string, finfo os.FileInfo)
return nil
}
if strings.HasPrefix(finfo.Name(), ".") {
log.Debugf("Skipping file %s", path)
return nil
}
if finfo.Name() == deviceSetMetaFile {
log.Debugf("Skipping file %s", path)
return nil