hackjutsu / Lepton

💻 Democratizing Snippet Management (macOS/Win/Linux)
https://hackjutsu.com/Lepton
MIT License
10.14k stars 475 forks source link

'Invalid filename' when I try to edit gist generate by vscode sync. #420

Closed sunxyw closed 4 years ago

sunxyw commented 4 years ago

Environment info

Description of the problem / feature request / question:

I used settings sync extension in vscode and it creates a gist for sync settings. However, when I try to edit this gist in Lepton, it said that it's an invalid filename. I know it's not a valid token for a filename in most OSs, this validation is useful for some careless users. But I think maybe you can let users selectively cancel this verification for some special needs.

If possible, provide a sample gist or screenshot:

If possible, provide the log files

I can't find information about debug mode (in Wiki). The log file will be sent to your email.

hackjutsu commented 4 years ago

Hi thanks for reaching out. As mentioned, Lepton validates the filenames by valid-filename. https://github.com/hackjutsu/Lepton/blob/master/app/containers/gistEditorForm/index.js#L86-L89

But I do agree that we can make it more flexible for special use cases. If you are interested, you can try add the switch "validateFilename" under the "editor" in .leptonrc. You can learn more from this PR.

hackjutsu commented 4 years ago

https://github.com/hackjutsu/Lepton/pull/421