diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index 31abb4c..55bcbeb 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -71,25 +71,11 @@ fn main() -> Result<(), Error> { } fn get_fs() -> Result, io::Error> { - let path = Path::new("target/disk.img"); - - match std::fs::metadata(path) { - Err(e) if e.kind() == io::ErrorKind::NotFound => (), - Err(e) => bail!(e), - Ok(_) => { - return FileSystem::new( - File::options().read(true).write(true).open(path)?, - FsOptions::new(), - ) - .into_report() - } - } - let mut img = File::options() .read(true) .write(true) .create(true) - .open(path)?; + .open(Path::new("target/disk.img"))?; img.set_len(1024 * 1024 * 64)?;