chore: manually check for symlink

This commit is contained in:
Matthias
2024-09-28 10:17:52 +02:00
parent 3dc92b42fe
commit 56835f5f09

View File

@@ -82,7 +82,7 @@ def create_userdata_dir(directory: str, create_dir: bool = False) -> Path:
for f in sub_dirs:
subfolder = folder / f
if not subfolder.is_dir():
if subfolder.exists(follow_symlinks=False):
if subfolder.exists() or subfolder.is_symlink():
raise OperationalException(
f"File `{subfolder}` exists already and is not a directory. "
"Freqtrade requires this to be a directory."