summaryrefslogtreecommitdiff
path: root/src/dreyfus/src/dreyfus_util.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/dreyfus/src/dreyfus_util.erl')
-rw-r--r--src/dreyfus/src/dreyfus_util.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dreyfus/src/dreyfus_util.erl b/src/dreyfus/src/dreyfus_util.erl
index ae3133e7d..6832299db 100644
--- a/src/dreyfus/src/dreyfus_util.erl
+++ b/src/dreyfus/src/dreyfus_util.erl
@@ -332,7 +332,10 @@ get_local_purge_doc_id(Sig) ->
get_signature_from_idxdir(IdxDir) ->
IdxDirList = filename:split(IdxDir),
Sig = lists:last(IdxDirList),
- case [Ch || Ch <- Sig, not (((Ch >= $0) and (Ch =< $9))
+ Sig2 = if not is_binary(Sig) -> Sig; true ->
+ binary_to_list(Sig)
+ end,
+ case [Ch || Ch <- Sig2, not (((Ch >= $0) and (Ch =< $9))
orelse ((Ch >= $a) and (Ch =< $f))
orelse ((Ch >= $A) and (Ch =< $F)))] == [] of
true -> Sig;