From 493bb730dd27af8d0af70285b61ff90a00d43406 Mon Sep 17 00:00:00 2001 From: 0xdavidel <0xdavidel@gmail.com> Date: Sat, 26 Sep 2020 11:10:33 +0300 Subject: [PATCH] Absolute path fix, no longer forcing old POE filter path This should allow the ability to put full paths in the setup.ini file in case of custom filter directories --- utils/BetterFilterAPI.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/utils/BetterFilterAPI.py b/utils/BetterFilterAPI.py index c717f8e..1cf6f47 100644 --- a/utils/BetterFilterAPI.py +++ b/utils/BetterFilterAPI.py @@ -25,9 +25,8 @@ def get_filter_directory(): """ Created by: 0xdavidel - Get the filter folder path - This path is always the filter directory - Proof - https://www.pathofexile.com/forum/view-thread/1835293/page/1#p14200591 + Get the old default filter path. + I was wrong to assume that the filter directory was persistant """ user_path = Path.home() return os.path.join(user_path, "Documents", "My Games", "Path of Exile") @@ -37,12 +36,12 @@ def get_filter_path(path): """ Created by: 0xdavidel - Get the absolute filter path + Get the absolute filter path, if the path inputted is absolute then it will return it back - meaning you can pass custom full paths """ filter_directory = get_filter_directory() - # If path is absolute check if its the POE filter path and return the path as is - if os.path.isabs(path) and path.startswith(filter_directory): + # If path is absolute return the path as is + if os.path.isabs(path): return path else: # The path is reletive, append it to the POE filter path