diff --git a/Cargo.toml b/Cargo.toml index 0fbe8fe..1c4069f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "screencat" -version = "1.1.1" +version = "1.1.2" description = "Screenshot auto-uploader with Sendcat" authors = ["Josh Lindsey "] license = "GPL-3.0-or-later" diff --git a/src/fs_watcher.rs b/src/fs_watcher.rs index e4f18ed..9892efc 100644 --- a/src/fs_watcher.rs +++ b/src/fs_watcher.rs @@ -115,7 +115,13 @@ impl FSWatcher { debug!("sendcat output: {:?}", output); let out: SendcatOutput = serde_json::from_slice(&output.stdout)?; - let url = &out.share_files[0].url; + let mut url = ""; + for file in &out.share_files { + if file.url != "STDIN.txt" { + url = &file.url; + break + } + } debug!("parsed URL from output: {}", url); self.copy_url_to_clipboard(url)?;