diff --git a/src/main.rs b/src/main.rs index 90c96fda..46eab5f4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ use seafowl::{ use tokio::time::{interval, Duration}; use tracing::level_filters::LevelFilter; -use tracing::{error, info, subscriber, warn}; +use tracing::{error, info, debug, subscriber, warn}; use tracing_log::LogTracer; use tracing_subscriber::filter::EnvFilter; @@ -157,6 +157,9 @@ async fn main() { config }; + debug!("Input configuration: {:?}", args); + debug!("Starting configuration: {:?}", config); + if !args.cli && let Some(ref metrics) = config.misc.metrics { diff --git a/src/object_store/wrapped.rs b/src/object_store/wrapped.rs index 04f1eba2..ad4446db 100644 --- a/src/object_store/wrapped.rs +++ b/src/object_store/wrapped.rs @@ -152,6 +152,9 @@ impl ObjectStore for InternalObjectStore { payload: PutPayload, opts: PutOptions, ) -> Result { + if let ObjectStoreConfig::Local(LocalConfig { disable_hardlinks: true, .. }) = self.config { + return self.inner.put_opts(location, payload, PutOptions{mode: object_store::PutMode::Overwrite, ..opts}).await + }; self.inner.put_opts(location, payload, opts).await } @@ -240,9 +243,9 @@ impl ObjectStore for InternalObjectStore { /// /// Will return an error if the destination already has an object. async fn copy_if_not_exists(&self, from: &Path, to: &Path) -> Result<()> { - if let ObjectStoreConfig::Local(LocalConfig { disable_hardlinks: true, .. }) = self.config { - return self.inner.copy(from, to).await; - } + if let ObjectStoreConfig::Local(LocalConfig { disable_hardlinks: true, .. }) = self.config { + return self.inner.copy(from, to).await; + } self.inner.copy_if_not_exists(from, to).await }