aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/gzip_downloader.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 06:39:08 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 06:39:08 +0900
commitff17dcdb757656c5e81b10070a7bbcc4ef3e97f7 (patch)
treeb11bf68b9466242e6021bef0e3b0e98e566647e2 /crates/shirabe/src/downloader/gzip_downloader.rs
parent6dd09abb33d86e1aa737667f9e15a18ed41d52e1 (diff)
downloadphp-shirabe-ff17dcdb757656c5e81b10070a7bbcc4ef3e97f7.tar.gz
php-shirabe-ff17dcdb757656c5e81b10070a7bbcc4ef3e97f7.tar.zst
php-shirabe-ff17dcdb757656c5e81b10070a7bbcc4ef3e97f7.zip
refactor(path): build paths with Path::join
Concatenating a directory, MAIN_SEPARATOR and a component reimplements what Path::join already does. Joining directly also drops the separator from the intermediate values it used to be baked into, such as ClassLoader's $pathEnd. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/downloader/gzip_downloader.rs')
-rw-r--r--crates/shirabe/src/downloader/gzip_downloader.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/shirabe/src/downloader/gzip_downloader.rs b/crates/shirabe/src/downloader/gzip_downloader.rs
index 3ddca2a4..962c5bb8 100644
--- a/crates/shirabe/src/downloader/gzip_downloader.rs
+++ b/crates/shirabe/src/downloader/gzip_downloader.rs
@@ -90,7 +90,11 @@ impl ArchiveDownloader for GzipDownloader {
.unwrap_or(""),
PATHINFO_FILENAME,
);
- let target_filepath = format!("{}{}{}", path, std::path::MAIN_SEPARATOR, filename);
+ let target_filepath = std::path::Path::new(path)
+ .join(&filename)
+ .into_os_string()
+ .into_string()
+ .unwrap();
if !Platform::is_windows() {
let command = vec![