Remove directories from filename

main
Bob Mottram 2019-11-18 12:54:41 +00:00
parent 8b6dd0798d
commit a332ccf219
1 changed files with 4 additions and 0 deletions

View File

@ -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