Skip to content

Commit 952c823

Browse files
authored
Merge pull request #14909 from NixOS/backport-tarball-pct-decode-to-2.31-maintenance
libfetchers: Actually percentDecode path when using the path from fil…
2 parents 91236dd + c8e56b3 commit 952c823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libfetchers/tarball.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static DownloadTarballResult downloadTarball_(
115115
// it is not in fact a tarball.
116116
if (url.rfind("file://", 0) == 0) {
117117
// Remove "file://" prefix to get the local file path
118-
std::string localPath = url.substr(7);
118+
std::string localPath = percentDecode(url.substr(7));
119119
if (!std::filesystem::exists(localPath)) {
120120
throw Error("tarball '%s' does not exist.", localPath);
121121
}

0 commit comments

Comments
 (0)