]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: fs: Don't attempt directory creation if it already exists
authorCole Robinson <crobinso@redhat.com>
Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 4 May 2015 16:56:38 +0000 (12:56 -0400)
commit262b3c05dd946328c4264bbab48958161e36aa6b
tree01fcfa08bba9b0032044b3b0078e16659cffd3eb
parentd6f8b35db506b4726374a05e84f0c0572379bcab
storage: fs: Don't attempt directory creation if it already exists

The current code attempts to handle this, but it only catches mkdir
failing with EEXIST. However if say trying to build /tmp for an
unprivileged qemu:///session, mkdir will fail with EPERM.

Rather than catch any errors, just don't attempt mkdir if the directory
already exists.
src/util/virfile.c