Skip to content

Commit

Permalink
web/cli: Use xiso.iso extension over xiso (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
antangelo authored Jul 23, 2023
1 parent c5439ea commit 4c5254b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [

[workspace.package]
license = "MIT"
version = "0.5.0"
version = "0.5.1"
edition = "2021"
repository = "https://github.com/antangelo/xdvdfs"
homepage = "https://github.com/antangelo/xdvdfs"
Expand Down
2 changes: 1 addition & 1 deletion xdvdfs-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ homepage.workspace = true
exclude = ["**/*.iso", "**/*.xiso"]

[dependencies]
xdvdfs = { path = "../xdvdfs-core", version = "0.5.0" }
xdvdfs = { path = "../xdvdfs-core", version = "0.5.1" }
clap = { version = "4.2.1", features = ["derive"] }
md-5 = { version = "0.10.5", default-features = false }
futures = "0.3.28"
Expand Down
2 changes: 1 addition & 1 deletion xdvdfs-cli/src/cmd_pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn get_default_image_path(source_path: &Path) -> Option<PathBuf> {
let output = PathBuf::from(source_file_name).with_extension("iso");

if output.exists() && output == source_path {
return Some(PathBuf::from(source_file_name).with_extension("xiso"));
return Some(PathBuf::from(source_file_name).with_extension("xiso.iso"));
}

Some(output)
Expand Down
2 changes: 1 addition & 1 deletion xdvdfs-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ wasm-bindgen = "0.2.84"
wasm-bindgen-futures = "0.4.34"
wasm-logger = "0.2.0"
web-sys = { version = "0.3.61", features = ["WritableStream", "MediaQueryList", "Window"] }
xdvdfs = { path = "../xdvdfs-core", version = "0.5.0" }
xdvdfs = { path = "../xdvdfs-core", version = "0.5.1" }
yew = { version = "0.20.0", features = ["csr"] }
yewprint = "0.4.4"
12 changes: 11 additions & 1 deletion xdvdfs-web/src/packing.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::path::PathBuf;

use crate::fs::FSWriteWrapper;

use super::fs::{self, FileSystemFileHandle};
Expand Down Expand Up @@ -194,7 +196,15 @@ impl Component for ImageBuilderWorkflow {
<H5>{"Save the output XISO image to a file"}</H5>
<div>
<FilePickerButton
kind={PickerKind::SaveFile(self.input_name().map(|name| format!("{}.xiso", name)))}
kind={PickerKind::SaveFile(
self.input_name().map(|name|
PathBuf::from(name)
.with_extension("xiso.iso")
.file_name()
.and_then(|name| name.to_str())
.map(|name| name.to_owned())
.expect("file name should be defined")
))}
button_text={"Save image"}
disabled={is_packing}
setter={ctx.link().callback(|res| {
Expand Down

0 comments on commit 4c5254b

Please sign in to comment.