From 3f817264378f72a7c04ff570a91f7aac3ba67837 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 22 Jul 2006 15:05:59 +0000 Subject: Return false for directories on md5_file with a FSNode as param. svn-id: r23560 --- common/md5.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/md5.cpp b/common/md5.cpp index 1962f8cb94..11bc5d6487 100644 --- a/common/md5.cpp +++ b/common/md5.cpp @@ -234,6 +234,9 @@ void md5_finish(md5_context *ctx, uint8 digest[16]) { } bool md5_file(const FilesystemNode &file, uint8 digest[16], uint32 length) { + if (file.isDirectory()) + return false; + return md5_file(file.path().c_str(), digest, length); } -- cgit v1.2.3