Skip to content
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

Crash when target file removed #6

Open
osjupiter opened this issue Apr 9, 2019 · 0 comments
Open

Crash when target file removed #6

osjupiter opened this issue Apr 9, 2019 · 0 comments

Comments

@osjupiter
Copy link

osjupiter commented Apr 9, 2019

note crashes when target file removed or renamed.

This problem causes a error with vim configued set writebackup.
Because vim with set writebackup rename the old file and create new one on save.

crash log

go run  . --no-editor aaa 
2019/04/09 22:13:32 [c.Args():  [aaa]]
2019/04/09 22:13:32 [Call openURL]
2019/04/09 22:13:32 [Call http.ListenAndServe]
2019/04/09 22:13:32 [Call runEditor()]
2019/04/09 22:14:01 [event: "aaa": RENAME] # save on vim or `mv aaa bbb`
2019/04/09 22:14:01 [open aaa: no such file or directory]
panic: open aaa: no such file or directory

goroutine 20 [running]:
main.markdownFileToHTML(0x7fff6e130336, 0x3, 0x2, 0xc00009b0a0, 0x201)
	/home/ooken/siken/note/handler.go:137 +0x245
main.(*markupHandler).Start(0xc0000b4cd0)
	/home/ooken/siken/note/handler.go:78 +0x4eb
created by main.run
	/home/ooken/siken/note/main.go:51 +0x21a
exit status 2

I was troubled with this problem so I wrote this for others.

version 0.3.0

@osjupiter osjupiter changed the title Crash when file removed Crash when target file removed Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant