Merge branch 'fix-external-link-detection'

This commit is contained in:
Matthias Beyer 2018-10-06 14:50:44 +02:00
commit 3dba5c219b

View file

@ -147,7 +147,7 @@ fn link_from_to<'a, I>(rt: &'a Runtime, from: &'a str, to: I)
for entry in to { for entry in to {
debug!("Handling 'to' entry: {:?}", entry); 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); debug!("Linking externally: {:?} -> {:?}", from, entry);
let url = Url::parse(entry).unwrap_or_else(|e| { let url = Url::parse(entry).unwrap_or_else(|e| {
error!("Error parsing URL: {:?}", e); error!("Error parsing URL: {:?}", e);