From ea78c416d0848e1cefa14f1278ffbdf6fffd0a13 Mon Sep 17 00:00:00 2001 From: "shiro.lee" Date: Thu, 6 Feb 2025 19:59:36 +0800 Subject: [PATCH] fix: fix windows build --- Cargo.lock | 3 +++ ecstore/src/disk/local.rs | 3 +-- iam/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec5d23dc..b26b9b83 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1494,6 +1494,9 @@ name = "ipnetwork" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf370abdafd54d13e54a620e8c3e1145f28e46cc9d704bc6d94414559df41763" +dependencies = [ + "serde", +] [[package]] name = "is_debug" diff --git a/ecstore/src/disk/local.rs b/ecstore/src/disk/local.rs index 2ffa85f0..cc58de3c 100644 --- a/ecstore/src/disk/local.rs +++ b/ecstore/src/disk/local.rs @@ -46,7 +46,6 @@ use crate::{ utils, }; use common::defer; -use nix::NixPath; use path_absolutize::Absolutize; use std::collections::{HashMap, HashSet}; use std::fmt::Debug; @@ -414,7 +413,7 @@ impl LocalDisk { file_path: impl AsRef, read_data: bool, ) -> Result<(Vec, Option)> { - if file_path.as_ref().is_empty() { + if file_path.as_ref().as_os_str().is_empty() { return Err(Error::new(DiskError::FileNotFound)); } diff --git a/iam/Cargo.toml b/iam/Cargo.toml index bf6a826f..e6e47259 100644 --- a/iam/Cargo.toml +++ b/iam/Cargo.toml @@ -21,7 +21,7 @@ thiserror.workspace = true strum = { version = "0.26.3", features = ["derive"] } arc-swap = "1.7.1" crypto = { path = "../crypto" } -ipnetwork = "0.21.1" +ipnetwork = { version = "0.21.1", features = ["serde"] } itertools = "0.14.0" futures.workspace = true rand.workspace = true