New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Node.js, new tiddlers with Type text/plain are saved in a file with double extension '.txt.tid' #2558
Comments
Thanks @JulioCantarero I can confirm the problem. @sukima this looks like another side effect of your recent changes, please could you look into this? Many thanks! |
Anything new on this issue? This also affects markdown files (when using the markdown plugin): This also leads to an error message when aborting an edit – which is supposed to delete the draft:
|
tiddlers always need to have a If you want it to have x.md you will need to add a x.meta file, that contains the tiddlywiki header. eg: title, tags, field ,,, and so on |
Hi @Awerick
Thanks, you've uncovered another problem with the filesystem adaptor. I'll post an update soon. |
The code here had got a bit broken by some PRs that I should have checked more carefully. I’ve done a major refactoring which will hopefully make it easier to understand, and fixes a number of problems: * Problem with eg .md tiddlers not being deleted correctly * Problem with Windows path separators not being usable within $:/config/FileSystemPaths on Windows * Problem with filename clashes not being detected correctly when saving to a different directory via $:/config/FileSystemPaths * Enables slashes within tiddler titles to be mapped into folders * Enables plain text files like .md and .css to be saved with .meta files instead of as .tid files (see #2558) * No longer replaces spaces with underscores As this is such a major update, I’d be grateful if Node.js users could give it a careful run through — in particular, you’ll need to try creating new tiddlers of various types and ensure that the expected files are created.
Hi @Awerick @pmario I've done a major refactoring of the file system adaptor, which should fix the deletion problem raised by @Awerick, as well as the OP. The prerelease isn't on npm so you'll have to install it as detailed here: http://tiddlywiki.com/#Installing%20TiddlyWiki%20Prerelease%20on%20Node.js |
Sorry @JulioCantarero, I closed this in error, please close it yourself when you've confirmed the fix. |
Ah! Thanks @pmario, I misunderstood this issue and TW's file concept then, sorry:
|
@Awerick The important thing is, that the filename has not much to do with the tiddler name. So the So if you like you can create a new |
Hi @Awerick
Great.
That problem should be fixed now.
Correct.
Known file types are now saved as a separate *.ext and *.ext.meta file. The goal here is to make it easier to edit the tiddler files with proper syntax colouring in a separate editor, and easier to re-use tiddler files.
My goal with the recent commit was to fix a number of issues that had accumulated thanks to my mistakenly merging some PRs that broke previous behaviour. |
I tried 5.1.14-prerelease using node.js on Windows 10 and the previous problem with txt files did not happen. Thank you! |
I did a clean test in a new TW5 new server instance using version 5.1.13. I am running TW5 on Node.js in Windows 10.
When I create a new tiddler with Type text/plain, it is saved in a file with double extension '.txt.tid'. This shows in the server log (see last line):
AFAIK, prior to 5.1.13 or 5.1.12, TW5 was saving these tiddlers in a simple '.tid' file.
Actually, this problem also happens with existing TXT tiddlers in upgraded TW5 on NOde.js, whose files are renamed to ".txt.tid" when the TXT tiddler is edited, leaving an undeleted Draft Of file behind.
The text was updated successfully, but these errors were encountered: