Skip to content

prune_under_directory_p: close log handle in subprocess

hexchain requested to merge hexchain/kdesrc-build:close-log-handle into master

Currently, kdesrc-build cannot clean the build directory of zxing-cpp because some files in it have 0444 permission. At the same time, k-s-b also does not leave any messages in the clean-builddir.log file when this happens, despite the underlying remove_tree call returning errors.

This change fixes the logging part, so at least the user can figure out what went wrong.

clean-builddir.log now looks like this (before this change, there was only the first line):

starting delete of /home/username/kde/build/zxing-cpp
/home/username/kde/build/zxing-cpp/_deps/stb-src/.git/objects/pack: error: cannot remove directory: Directory not empty
/home/username/kde/build/zxing-cpp/_deps/stb-src/.git/objects: error: cannot remove directory: Directory not empty
/home/username/kde/build/zxing-cpp/_deps/stb-src/.git: error: cannot remove directory: Directory not empty
/home/username/kde/build/zxing-cpp/_deps/stb-src: error: cannot remove directory: Directory not empty
/home/username/kde/build/zxing-cpp/_deps: error: cannot remove directory: Directory not empty

Merge request reports