mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for creating multiple story copies when loading a v1 story
This commit is contained in:
@@ -66,6 +66,9 @@ def getdirpath(dir, title):
|
|||||||
# Returns the path (as a string) to the given story by its name
|
# Returns the path (as a string) to the given story by its name
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
def storypath(name):
|
def storypath(name):
|
||||||
|
if os.path.exists("stories/{}".format(name)) and os.path.isdir("stories/{}".format(name)):
|
||||||
|
if os.path.exists("stories/{}/story.json".format(name)):
|
||||||
|
return "stories/{}/story.json".format(name)
|
||||||
return path.join("stories", name + ".json")
|
return path.join("stories", name + ".json")
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
|
Reference in New Issue
Block a user