Skip to content

Commit

Permalink
Merge pull request #1 from mrchypark/build-test
Browse files Browse the repository at this point in the history
no_hardlinks to disable_hardlinks
  • Loading branch information
mrchypark authored Sep 2, 2024
2 parents 4a63cb4 + fcdae78 commit be2d8fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
{
Expand Down
9 changes: 6 additions & 3 deletions src/object_store/wrapped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ impl ObjectStore for InternalObjectStore {
payload: PutPayload,
opts: PutOptions,
) -> Result<PutResult> {
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
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit be2d8fa

Please sign in to comment.