From f61b50dbfc446b9ddd4d769ed59608af439cffc0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 21 Feb 2026 20:35:50 +0100 Subject: [PATCH] chore: improved docstring --- freqtrade/misc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/freqtrade/misc.py b/freqtrade/misc.py index 5c31d5805..e0658f020 100644 --- a/freqtrade/misc.py +++ b/freqtrade/misc.py @@ -84,7 +84,12 @@ def file_load_json(file: Path): def is_file_in_dir(file: Path, directory: Path) -> bool: """ - Helper function to check if file is in directory. + Helper function to check if file is directly within a directory. + :param file: File to check + :param directory: Directory to check against + When used in the API, this parameter cannot be user controlled (outside of the config) + to avoid security issues. + :return: True if file is directly within directory, False otherwise """ return file.is_file() and file.parent.samefile(directory)