]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: fix path building for non-raw images
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Apr 2026 09:52:41 +0000 (11:52 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Apr 2026 10:04:44 +0000 (12:04 +0200)
If the passed in image path didn't end with .raw, we'd return an empty
string + suffix instead of the intended image + suffix path.

Follow-up for 89e62e0bd3cb72915b705b5e2da1834e4d8aea9f.

src/shared/dissect-image.c

index e33e78d31026dc589d40313bffa5deb14288de68..2293cd5acbb6a337171840a1146c94ef36cd094f 100644 (file)
@@ -3728,7 +3728,7 @@ static char *build_auxiliary_path(const char *image, const char *suffix) {
 
         e = endswith(image, ".raw");
         if (!e)
-                return strjoin(e, suffix);
+                return strjoin(image, suffix);
 
         n = new(char, e - image + strlen(suffix) + 1);
         if (!n)