Skip to content

Commit e290a34

Browse files
authored
fix/windows: bin directory must exist before adding to dll search path (#123)
* fix: `bin` dir must exist before adding to dll search path Signed-off-by: Cocoa <[email protected]>
1 parent a543238 commit e290a34

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## v0.7.5
4+
5+
#### Fixes
6+
7+
* Creating `bin` directory if it does not exist on Windows before adding it to the DLL searching path (#123)
8+
39
## v0.7.4
410

511
#### Fixes

lib/adbc/dll_loader.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ defmodule Adbc.Nif.DLLLoader do
44
def __on_load__ do
55
case :os.type() do
66
{:win32, _} ->
7-
path = :filename.join(:code.priv_dir(:adbc), ~c"adbc_dll_loader")
7+
priv_dir = :code.priv_dir(:adbc)
8+
File.mkdir_p!(Path.join(priv_dir, "bin"))
9+
path = :filename.join(priv_dir, ~c"adbc_dll_loader")
810
:erlang.load_nif(path, 0)
911
add_dll_directory()
1012

0 commit comments

Comments
 (0)