aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2006-07-22 15:05:59 +0000
committerJohannes Schickel2006-07-22 15:05:59 +0000
commit3f817264378f72a7c04ff570a91f7aac3ba67837 (patch)
treee45d1262099e599b0e02484ab3ffc7a498fbed5f /common
parent4ae5cef4913ff8b581acd5902e2912352133fb35 (diff)
downloadscummvm-rg350-3f817264378f72a7c04ff570a91f7aac3ba67837.tar.gz
scummvm-rg350-3f817264378f72a7c04ff570a91f7aac3ba67837.tar.bz2
scummvm-rg350-3f817264378f72a7c04ff570a91f7aac3ba67837.zip
Return false for directories on md5_file with a FSNode as param.
svn-id: r23560
Diffstat (limited to 'common')
-rw-r--r--common/md5.cpp3
1 files changed, 3 insertions, 0 deletions
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);
}