From: Joel Rosdahl Date: Sat, 3 Feb 2024 19:49:57 +0000 (+0100) Subject: fix: Detect bad remote storage URLs gracefully again X-Git-Tag: v4.10~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=389dfd90fe330c53e9972857e7e485a7cc954d06;p=thirdparty%2Fccache.git fix: Detect bad remote storage URLs gracefully again Regression in 829f93c48f21. Fixes #1394. --- diff --git a/src/storage/Storage.cpp b/src/storage/Storage.cpp index fb72e1763..3de75c84a 100644 --- a/src/storage/Storage.cpp +++ b/src/storage/Storage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021-2023 Joel Rosdahl and other contributors +// Copyright (C) 2021-2024 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -132,7 +132,7 @@ url_from_string(const std::string& url_string) // now to avoid exceptions later. Url url(url_string); try { - std::ignore = url.scheme(); + std::ignore = url.str(); } catch (const std::exception& e) { return tl::unexpected(FMT("Cannot parse URL {}: {}", url_string, e.what())); }