Use txt.conf:Authors for txt-new. Don't use Draft in filename

git-svn-id: file:///srv/svn/repo/kosuzu/trunk@32 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
fox
2022-11-19 11:37:52 +00:00
parent 215cd434ef
commit 52117ca0c6
2 changed files with 9 additions and 11 deletions

View File

@@ -124,8 +124,8 @@ let versioned_basename_of_title ?(version=0) repo extension (title : string) =
next version
let id_filename repo extension text =
let basename = Text.alias text in
let candidate = Filename.concat repo (text.id ^ "." ^ basename ^ extension) in
let description = match Text.alias text with "" -> "" | x -> "." ^ x in
let candidate = Filename.concat repo (text.id ^ description ^ extension) in
if Sys.file_exists candidate then Error "Name clash, try again" else Ok candidate
let with_text ?(dir=txtdir ()) new_text =