mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Allow deleting and renaming stories in the browser
This commit is contained in:
4
utils.py
4
utils.py
@ -88,8 +88,8 @@ def addsentencespacing(txt, vars):
|
||||
# Cleans string for use in file name
|
||||
#==================================================================#
|
||||
def cleanfilename(filename):
|
||||
keepcharacters = (' ','.','_')
|
||||
filename = "".join(c for c in filename if c.isalnum() or c in keepcharacters).rstrip()
|
||||
filteredcharacters = ('/','\\')
|
||||
filename = "".join(c for c in filename if c not in filteredcharacters).rstrip()
|
||||
return filename
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user