]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Detect bad remote storage URLs gracefully again
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 3 Feb 2024 19:49:57 +0000 (20:49 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 3 Feb 2024 19:53:24 +0000 (20:53 +0100)
Regression in 829f93c48f21.

Fixes #1394.

(cherry picked from commit 389dfd90fe330c53e9972857e7e485a7cc954d06)

src/storage/Storage.cpp

index fb72e17633a213a1c50d1b92e0b098ca244d67d4..3de75c84ace9c4fd14caf0aa94590f869f65b089 100644 (file)
@@ -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()));
   }