Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion files/rustc/gcc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ sha256 = "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8"
license = "GNU General Public License"

[[files]]
name = "/rustc/gcc/gcc-9.2.0.tar.xz"
name = "rustc/gcc/gcc-9.2.0.tar.xz"
sha256 = "ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206"
source = "https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz"
license = "GNU General Public License"

[[files]]
name = "rustc/gcc/gcc-9.5.0.tar.xz"
sha256 = "27769f64ef1d4cd5e2be8682c0c93f9887983e6cfd1a927ce5a0a2915a95cf8f"
source = "https://ftp.gnu.org/gnu/gcc/gcc-9.5.0/gcc-9.5.0.tar.xz"
license = "GNU General Public License"
10 changes: 10 additions & 0 deletions src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ pub(crate) fn load_manifests(load_from: &Path) -> Result<(Vec<MirrorFile>, Vec<S
rename_from: managed.rename_from,
},
};
if mirror_file.name.starts_with('/') {
emit_error(
"Mirrored path cannot start with a slash (/)".to_string(),
&mirror_file,
&file_source,
cache,
errors,
);
}

if let Source::Url(ref source) = mirror_file.source {
if let Some(file_name) = source.path().split('/').last()
&& let Some(path_name) = mirror_file.name.split('/').last()
Expand Down