From 66b8436cd41c16f25221c03a1d03d1b69f161613 Mon Sep 17 00:00:00 2001 From: laharah Date: Sat, 19 Jan 2019 19:57:48 -0800 Subject: [PATCH] fixed error when save path contains extra / --- README.md | 2 +- filebottool/core.py | 3 +++ setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3795a3f..b3572e0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # FilebotTool: FileBot Integration for Deluge *requires [Filebot](http://www.filebot.net/)* -**Version 1.2.1** +**Version 1.2.2** ##### [Download Latest Release](https://github.com/Laharah/deluge-FilebotTool/releases/latest) diff --git a/filebottool/core.py b/filebottool/core.py index 2c31630..870ebcf 100755 --- a/filebottool/core.py +++ b/filebottool/core.py @@ -384,6 +384,9 @@ def _get_filebot_target(self, torrent_id): def _get_full_os_path(save_path, deluge_path): """given a save path and a deluge file path, return the actual os path of a given file""" + sp = save_path.split(os.path.sep) + if sp[-1] == '': + sp = sp[:-1] return os.path.sep.join(save_path.split(os.path.sep) + deluge_path.split('/')) diff --git a/setup.py b/setup.py index 8dea4fa..3db88a2 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ __plugin_name__ = "FileBotTool" __author__ = "laharah" __author_email__ = "laharah+fbt@gmail.com" -__version__ = "1.2.1" +__version__ = "1.2.2" __url__ = "https://github.com/Laharah/deluge-FileBotTool" __license__ = "GPLv3" __description__ = "Integrates FileBot functionality to Deluge"