]> git.lizzy.rs Git - rust.git/commitdiff
Accept arbitrary filenames into URLs in build-manifest
authorAndrea Canciani <ranma42@gmail.com>
Tue, 25 Apr 2017 14:08:14 +0000 (16:08 +0200)
committerAndrea Canciani <ranma42@gmail.com>
Tue, 25 Apr 2017 14:08:14 +0000 (16:08 +0200)
instead of combining the component and target into a URL.

src/tools/build-manifest/src/main.rs

index a8cb30da43513944b842a7946d06f1730d287374..c6f6b2dbc0f2153f403c72153d06c2e0bc9ad50a 100644 (file)
@@ -293,7 +293,7 @@ fn build_manifest(&mut self) -> Manifest {
 
             pkg.target.insert(host.to_string(), Target {
                 available: true,
-                url: Some(self.url("rust", host)),
+                url: Some(self.url(&filename)),
                 hash: Some(digest),
                 components: Some(components),
                 extensions: Some(extensions),
@@ -325,7 +325,7 @@ fn package(&mut self,
 
             (name.to_string(), Target {
                 available: true,
-                url: Some(self.url(pkgname, name)),
+                url: Some(self.url(&filename)),
                 hash: Some(digest),
                 components: None,
                 extensions: None,
@@ -338,11 +338,11 @@ fn package(&mut self,
         });
     }
 
-    fn url(&self, component: &str, target: &str) -> String {
+    fn url(&self, filename: &str) -> String {
         format!("{}/{}/{}",
                 self.s3_address,
                 self.date,
-                self.filename(component, target))
+                filename)
     }
 
     fn filename(&self, component: &str, target: &str) -> String {