Skip to content

Commit 1533b6d

Browse files
authored
FIX wrap data_home in Path() (#40)
1 parent 3bc275b commit 1533b6d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libsvmdata/abstraction.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ def _get_data_home(subdir_name=""):
1414
seek for the variable $XDG_DATA_HOME. Finally, the fallback is $HOME/data.
1515
"""
1616
data_home = os.environ.get("LIBSVMDATA_HOME", None)
17+
1718
if data_home is None:
1819
data_home = os.environ.get("XDG_DATA_HOME", None)
1920
if data_home is None:
2021
data_home = Path.home() / "data"
22+
else:
23+
data_home = Path(data_home)
24+
2125
return data_home / subdir_name
2226

2327

0 commit comments

Comments
 (0)