diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-07-14 21:04:46 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-07-14 21:04:46 +0200 |
commit | 1dd40ca8b9d9557beda3ffddfb5109a77c8f2843 (patch) | |
tree | c10d2e97ed2497efe0092739bc534bea671e4a87 /libimagentrylink | |
parent | 295374e1bd2e3d1867f2ec70ff196ee6125c8815 (diff) |
Temporary fix: Check whether an StoreId is an external link by str::contains()
This is a temporary fix as long as we do not have a clear model how we
handle internal/external StoreId types
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 01f6badb..a9df5f87 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.starts_with("/link/external/") + id.to_str().map(|s| s.contains("/link/external/")).unwrap_or(false) } fn get_external_link_from_file(entry: &FileLockEntry) -> Result<Url> { |