From 8c61616d3c258562ec9554edbb76e11de4a99de4 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Wed, 6 Dec 2017 09:22:27 -0600 Subject: [PATCH] directory has to end in slash to use exists() --- resources/lib/advanced_editor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/lib/advanced_editor.py b/resources/lib/advanced_editor.py index e0261e2..cdf099a 100644 --- a/resources/lib/advanced_editor.py +++ b/resources/lib/advanced_editor.py @@ -89,9 +89,14 @@ class AdvancedBackupEditor: if(enterHome): rootFolder = self.dialog.input(utils.getString(30116),defaultt=rootFolder) + #direcotry has to end in slash + if(rootFolder[:-1] != '/'): + rootFolder = rootFolder + '/' + #check that this path even exists if(not xbmcvfs.exists(xbmc.translatePath(rootFolder))): self.dialog.ok(utils.getString(30117),utils.getString(30118),rootFolder) + return None else: #select path to start set rootFolder = self.dialog.browse(type=0,heading=utils.getString(30119),shares='files',defaultt=rootFolder)