spamwax / alfred-pinboard-rs

Alfred Workflow for Pinboard (Rust)
Other
280 stars 13 forks source link

Can't load bookmarks if there exists url that is not begins with http(s) #24

Closed alwc closed 5 years ago

alwc commented 5 years ago

So today when I was using your workflow, all of the sudden I could no longer fetch my tags. I removed and reinstalled the workflow, but everything I did was of no avail. So I took a look at the error message from the workflow's bash scripts when I ran ./alfred-pinboard-rs list:

thread 'main' panicked at 'Invalid url: Error { kind: UrlBadScheme, url: Some("file:///C:/Users/alwc/Downloads/test.pdf") }', src/libcore/result.rs:1009:5               
note: Run with `RUST_BACKTRACE=1` for a backtrace. 

After that I removed the bookmark with file:///Users/alwc/Downloads/test.pdf url on the pinboard website and reinstalled the workflow, then everything works smoothly once again!

TL;DR: I suspect urls that do not begin with 'http(s)' will crash the workflow.

spamwax commented 5 years ago

That's very strange, i use url crate which can successfully parse file:///Users/alwc/Downloads/test.pdf If you don't mind, can you add that back to your bookmarks. then open Alfred's debug window for my workflow and choose "show everything". then cause a crash and share the output of debug with me?

spamwax commented 5 years ago

I could reproduce this, will try to fix it soon.

alwc commented 5 years ago

Sorry I didn't have time to reproduce the bug.

By the way, thanks for creating such a wonderful Alfred workflow!