When saving files, it's easy to overwrite an existing file #68
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#68
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When saving files, there are no checks to prevent overwriting existing files. So if you were to visit gopher://web.site:70/0/todo.txt and save the file using
:w .
your own file called todo.txt would be overwritten without warning.Something I just remembered as well is that saving will break on certain gopher sites... or at least get weird. The gopher url RFC does not require use of slashes as a path separator. As a result conman.org and a few other sites use
:
or other items. This inconsistency will make choosing a filename for those sites weird.To the root issue here, a call to something like
fileExists
(I cant remember what it is called in go) in a loop appending numbers as needed until a file name is available would probably work. Though there may be a better way. We'd probably want the number to go before any file extension.A fix for this is open as PR #73 , I will close this if/once it gets merged in.
Fixed in #73