Skip to content

FS: Use the correct rm/rmdir method when moving files between mounts - #1770

Merged
adamziel merged 2 commits into
trunkfrom
use-correct-rm-in-fshelpers-mv
Sep 17, 2024
Merged

FS: Use the correct rm/rmdir method when moving files between mounts#1770
adamziel merged 2 commits into
trunkfrom
use-correct-rm-in-fshelpers-mv

Conversation

@adamziel

@adamziel adamziel commented Sep 16, 2024

Copy link
Copy Markdown
Collaborator

Fixes this problem occuring when moving files between mounts:

Not a directory or a symbolic link to a directory

It occured because we always attempted to remove the source file using rmdir instead of choosing either rm or rmdir. This PR introduces a proper check.

Once it's merged, let's tag a new @wp-playground/cli release.

Testing instructions

Confirm the unit tests pass## Motivation for the change, related issues

```
Not a directory or a symbolic link to a directory
```

It occured because we always attempted to remove the source file using `rmdir` instead of choosing either `rm` or `rmdir`. This PR introduces a proper check.

 ## Testing instructions

Confirm the unit tests pass
@adamziel

Copy link
Copy Markdown
Collaborator Author

Test failures are unrelated, let's ship it

@adamziel
adamziel merged commit 41a0f6f into trunk Sep 17, 2024
@adamziel
adamziel deleted the use-correct-rm-in-fshelpers-mv branch September 17, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 participant