diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-07-14 21:27:36 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-07-14 21:27:36 +0200 |
commit | 3f2ababdb0e16e3b638147002ba470e66060c0fd (patch) | |
tree | 73fe391a7d01c225e63b52eb81bfbed9d753ee6f /libimagentrylink | |
parent | 1dd40ca8b9d9557beda3ffddfb5109a77c8f2843 (diff) |
Add more robust version of is_external_link_storeid() helper function
Diffstat (limited to 'libimagentrylink')
-rw-r--r-- | libimagentrylink/src/external.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libimagentrylink/src/external.rs b/libimagentrylink/src/external.rs index a9df5f87..fab878b9 100644 --- a/libimagentrylink/src/external.rs +++ b/libimagentrylink/src/external.rs @@ -97,7 +97,7 @@ pub trait ExternalLinker : InternalLinker { /// Check whether the StoreId starts with `/link/external/` pub fn is_external_link_storeid(id: &StoreId) -> bool { debug!("Checking whether this is a /link/external/*: '{:?}'", id); - id.to_str().map(|s| s.contains("/link/external/")).unwrap_or(false) + id.parent().map(|par| par.ends_with("/link/external")).unwrap_or(false) } fn get_external_link_from_file(entry: &FileLockEntry) -> Result<Url> { |