1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #42272 from brettmilford/master

Fixes subvol delete on a non-btrfs volume
This commit is contained in:
Sebastiaan van Stijn 2021-04-22 20:49:22 +02:00 committed by GitHub
commit 20bd03b7a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ if command -v btrfs > /dev/null 2>&1; then
# Find btrfs subvolumes under $dir checking for inode 256
# Source: http://stackoverflow.com/a/32865333
for subvol in $(find "$dir" -type d -inum 256 | sort -r); do
if [ "$dir" != "$subvol" ]; then
if [ "$dir" != "$subvol" ] && subvolType="$(stat -f --format=%T "$subvol")" && [ "$subvolType" = "btrfs" ]; then
(
set -x
btrfs subvolume delete "$subvol"