From 8b18bd115c0f18a3677fc1244d8dccfb441809a7 Mon Sep 17 00:00:00 2001 From: Tsukasa OI Date: Tue, 7 Nov 2017 11:18:39 +0900 Subject: [PATCH] Fix relative path issue on Win32 ssdeep on Win32 fails to open files if relative path option `-l' is given. This is due to inconsistent path handling on engine.cpp and this commit will fix this issue. This bug is reported by Robert Engelhardt. --- engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine.cpp b/engine.cpp index fd86f35..0df7c6e 100644 --- a/engine.cpp +++ b/engine.cpp @@ -63,7 +63,7 @@ int hash_file(state *s, TCHAR *fn) { #ifdef WIN32 TCHAR expanded_fn[SSDEEP_PATH_MAX]; - if (not expanded_path(fn)) { + if (not expanded_path(fn) && !(s->mode & mode_relative)) { _sntprintf(expanded_fn, SSDEEP_PATH_MAX, _TEXT("\\\\?\\%s"),