From 7d5874d31209d819707a97453668c4878a5228a9 Mon Sep 17 00:00:00 2001 From: Sude Date: Wed, 31 Dec 2014 06:14:55 +0200 Subject: [PATCH] Make sure that file is regular file when getting local hash --- src/downloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/downloader.cpp b/src/downloader.cpp index 5775d30..cdebc6e 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2645,7 +2645,7 @@ std::string Downloader::getLocalFileHash(const std::string& filepath, const std: } else { - if (boost::filesystem::exists(path)) + if (boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) { localHash = Util::getFileHash(path.string(), RHASH_MD5); }