From a332ccf2192ca75f7d811bcf715742df0359d28c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 18 Nov 2019 12:54:41 +0000 Subject: [PATCH] Remove directories from filename --- posts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/posts.py b/posts.py index ed707abec..9291a5f59 100644 --- a/posts.py +++ b/posts.py @@ -2384,6 +2384,10 @@ def createBoxIndexed(session,baseDir: str,boxname: str, \ if not postFilename: continue + # if this is a full path then remove the directories + if '/' in postFilename: + postFilename=postFilename.split('/')[-1] + # filename of the post without any extension or path postUrl=postFilename.replace('\n','').replace('.json','') # get the full path of the post