Compare commits
1 Commits
cuddle-ple
...
a65190ef9d
Author | SHA1 | Date | |
---|---|---|---|
|
a65190ef9d |
@@ -6,11 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [0.2.0] - 2025-08-24
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- move also creates parent dir on destination
|
|
||||||
|
|
||||||
## [0.1.2] - 2025-08-08
|
## [0.1.2] - 2025-08-08
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.0"
|
version = "0.1.2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
noil = { path = "crates/noil" }
|
noil = { path = "crates/noil" }
|
||||||
|
@@ -328,14 +328,6 @@ pub async fn apply(input: &str, options: ApplyOptions) -> anyhow::Result<()> {
|
|||||||
anyhow::bail!("destination already exists cannot move");
|
anyhow::bail!("destination already exists cannot move");
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(parent) = existing.path.parent()
|
|
||||||
&& !parent.exists()
|
|
||||||
{
|
|
||||||
tokio::fs::create_dir_all(&parent)
|
|
||||||
.await
|
|
||||||
.context("failed to create dest for move")?;
|
|
||||||
}
|
|
||||||
|
|
||||||
tokio::fs::rename(&existing.path, path)
|
tokio::fs::rename(&existing.path, path)
|
||||||
.await
|
.await
|
||||||
.context("move path")?;
|
.context("move path")?;
|
||||||
|
Reference in New Issue
Block a user