diff --git a/src/ec_file.erl b/src/ec_file.erl index 7d89ace..9637529 100644 --- a/src/ec_file.erl +++ b/src/ec_file.erl @@ -277,9 +277,15 @@ remove_recursive(Path, Options) -> tmp() -> case erlang:system_info(system_architecture) of "win32" -> - "./tmp"; + case os:getenv("TEMP") of + false -> "./tmp"; + Val -> Val + end; _SysArch -> - "/tmp" + case os:getenv("TMPDIR") of + false -> "/tmp"; + Val -> Val + end end. %% Copy the subfiles of the From directory to the to directory.