The title isn't completely accurate as it is difficult to summarize the 
problem. Plain text .txt files or .md files, loaded via a tiddlywiki.files 
declaration load in the TiddlyWiki just fine. However, editing them is 
problematic.

With a subdir in my tiddlers directory called "notes", containing a file 
"mynote.txt", editing results in a file "mynote 1.txt" and "mynote 
1txt.meta" whereas I would expect the original "mynote.txt" to be updated 
and a .meta file created. This behavior leads to duplication of tiddler 
files and is rather confusing. If the intent was that files loaded in this 
manner should not be editable, then we should find a way to set them as 
read only.

It is possible that the problem may arise from my tiddlywiki.files 
declaration as I am new to this, so here it is:

{
>   "directories" : [
>     {
>       "path" : "../notes",
>       "filesRegExp" : ".+\\.txt",
>       "isTiddlerFile" : false,
>       "fields" : {
>         "title" : {"source" : "basename-uri-decoded"},
>         "created": {"source" : "created"},
>         "modified": {"source" : "modified"},
>         "type": "text/plain",
>         "tags": ["note", "externalnote"]
>       }
>     }
>   ]
> }



Digging into the code in boot.js reveals that not .txt or .md files that do 
not have .meta files and are loaded via a tiddlywiki.files declaration are 
never added to $tw.boot.files (as they don't have their filepath 
set):https://github.com/Jermolene/TiddlyWiki5/blob/a4035d34247e2f27efc9cb6228432deea21d73a3/boot/boot.js#L1786

Likely this is the problem and leads the save handler to rename the tiddler 
because of an assumed file name clash, leading to file names like "mynote 
1.txt".

Have I missed something with my configuration? If not, feature or bug?
Regards,

Saq

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/879fee1f-dd83-4546-ae41-1505729a9543%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to