summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-10-06 14:50:44 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-10-06 14:50:44 +0200
commit3dba5c219be1da3982a7f7fce0853b94e9cd9300 (patch)
treef6d59a8704caa58676c694b03090c031c9366ab2
parenta101e777f365bc1e1fcd9f4ca3f9a9b6198e70af (diff)
parent029b83042da6ef896224260f93fbe26ebe6e1721 (diff)
downloadimag-3dba5c219be1da3982a7f7fce0853b94e9cd9300.zip
imag-3dba5c219be1da3982a7f7fce0853b94e9cd9300.tar.gz
Merge branch 'fix-external-link-detection'
-rw-r--r--bin/core/imag-link/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/core/imag-link/src/main.rs b/bin/core/imag-link/src/main.rs
index 46ce39e..8f839f9 100644
--- a/bin/core/imag-link/src/main.rs
+++ b/bin/core/imag-link/src/main.rs
@@ -147,7 +147,7 @@ fn link_from_to<'a, I>(rt: &'a Runtime, from: &'a str, to: I)
for entry in to {
debug!("Handling 'to' entry: {:?}", entry);
- if PathBuf::from(entry).exists() {
+ if !rt.store().get(PathBuf::from(entry)).map_err_trace_exit_unwrap(1).is_some() {
debug!("Linking externally: {:?} -> {:?}", from, entry);
let url = Url::parse(entry).unwrap_or_else(|e| {
error!("Error parsing URL: {:?}", e);