mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-27 02:04:39 +10:00
feat: clearer error messages
This commit is contained in:
Generated
+1
-1
@@ -219,7 +219,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "droplet-rs"
|
name = "droplet-rs"
|
||||||
version = "0.12.2"
|
version = "0.12.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Drop-OSS"]
|
authors = ["Drop-OSS"]
|
||||||
name = "droplet-rs"
|
name = "droplet-rs"
|
||||||
version = "0.12.2"
|
version = "0.12.3"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
description = "Droplet is a `napi.rs` Rust/Node.js package full of high-performance and low-level utils for Drop"
|
description = "Droplet is a `napi.rs` Rust/Node.js package full of high-performance and low-level utils for Drop"
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ use tokio::{
|
|||||||
io::{AsyncReadExt as _, AsyncSeekExt as _, BufReader},
|
io::{AsyncReadExt as _, AsyncSeekExt as _, BufReader},
|
||||||
process::Command,
|
process::Command,
|
||||||
};
|
};
|
||||||
use x509_parser::nom::InputIter;
|
|
||||||
|
|
||||||
use crate::versions::types::{MinimumFileObject, VersionBackend, VersionFile};
|
use crate::versions::types::{MinimumFileObject, VersionBackend, VersionFile};
|
||||||
|
|
||||||
@@ -55,7 +54,7 @@ impl VersionBackend for PathVersionBackend {
|
|||||||
self.peek_file(
|
self.peek_file(
|
||||||
relative
|
relative
|
||||||
.to_str()
|
.to_str()
|
||||||
.ok_or(anyhow!("Could not parse path"))?
|
.ok_or(anyhow!("Could not parse path: {}", relative.to_string_lossy()))?
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
@@ -87,7 +86,7 @@ impl VersionBackend for PathVersionBackend {
|
|||||||
async fn peek_file(&mut self, sub_path: String) -> anyhow::Result<VersionFile> {
|
async fn peek_file(&mut self, sub_path: String) -> anyhow::Result<VersionFile> {
|
||||||
let pathbuf = self.base_dir.join(sub_path.clone());
|
let pathbuf = self.base_dir.join(sub_path.clone());
|
||||||
if !pathbuf.exists() {
|
if !pathbuf.exists() {
|
||||||
return Err(anyhow!("Path doesn't exist."));
|
return Err(anyhow!("Path doesn't exist: {}", pathbuf.to_string_lossy()));
|
||||||
};
|
};
|
||||||
|
|
||||||
let file = File::open(pathbuf.clone()).await?;
|
let file = File::open(pathbuf.clone()).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user