Skip to content

Commit c44bcd3

Browse files
committed
fixup! fix: wrap data_home in Path()
1 parent e32edd8 commit c44bcd3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libsvmdata/abstraction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +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"
2122
else:
2223
data_home = Path(data_home)
24+
2325
return data_home / subdir_name if subdir_name else data_home
2426

2527

0 commit comments

Comments
 (0)