21eb897 storage: On error rmdir created directory in virDirCreate[NoFork]

Authored and Committed by John Ferlan 8 years ago
    storage: On error rmdir created directory in virDirCreate[NoFork]
    
    After a successful creation of a directory, if some other call results
    in returning a failure, let's remove the directory we created to
    prevent another round trip or confusion in the caller. In particular, this
    function can be called during a storage backend buildVol, so in order
    to ensure that caller doesn't need to distinguish between failed create
    or some other failure after create, just remove the directory we created.
    
    Signed-off-by: John Ferlan <jferlan@redhat.com>
    
        
file modified
+37 -2