mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-28 11:54:01 -04:00
fdio: Delete .tmp file on failure
We noticed the temp files being left over in ostree when (mistakenly) trying to replace the contents of a subpath that wasn't a directory. In the future we should look at the systemd code using `O_TMPFILE` here.
This commit is contained in:
committed by
Colin Walters
parent
afe3c3a861
commit
a6d08657aa
@@ -746,6 +746,8 @@ glnx_file_replace_contents_with_perms_at (int dfd,
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (!ret)
|
||||
(void) unlink (tmppath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user