Skip to content

Commit

Permalink
refactor: rename mke2fs to mkfs.ext4
Browse files Browse the repository at this point in the history
it's working better for unknown reasons
  • Loading branch information
Xtr126 committed Feb 17, 2024
1 parent 5f7060e commit 591863b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ async fn create_data_img(
use tauri::api::process::Command;

#[cfg(windows)]
let output = Command::new_sidecar("mke2fs")
let output = Command::new_sidecar("mkfs.ext4")
.map_err(|err| err.to_string())?
.args([
"-F", "-b", "4096", "-L", "/data", "-t", "ext4",
"-F", "-b", "4096", "-L", "/data",
&data_img_path.display().to_string(),
format!("{size}G").as_str()
])
Expand All @@ -84,7 +84,7 @@ async fn create_data_img(
#[cfg(target_os = "linux")]
let output = Command::new("mkfs.ext4")
.args([
"-F", "-b", "4096", "-L", "/data", "-t", "ext4",
"-F", "-b", "4096", "-L", "/data",
&data_img_path.display().to_string(),
format!("{size}G").as_str()
])
Expand Down
6 changes: 2 additions & 4 deletions src-tauri/tauri.windows.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
"open": false,
"scope": [
{
"name": "mke2fs",
"name": "mkfs.ext4",
"sidecar": true,
"args": [
"-F",
"-b",
"4096",
"-L",
"/data",
"-t",
"ext4",
{ "validator": "\\S+" },
{ "validator": "\\S+" }
]
Expand All @@ -27,7 +25,7 @@
"bundle": {
"resources": ["mke2fs.conf",
"*.dll"],
"externalBin": [ "mke2fs" ]
"externalBin": [ "mkfs.ext4" ]
}
}
}

0 comments on commit 591863b

Please sign in to comment.