Skip to content

Commit

Permalink
Fix relative path issue on Win32
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
a4lg committed Nov 7, 2017
1 parent ae9a525 commit 8b18bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine.cpp
Expand Up @@ -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"),
Expand Down

0 comments on commit 8b18bd1

Please sign in to comment.