lib: Ensure an error is set in ensure_unlinked() if errno != ENOENT
We hit this with:
```
27411 unlink("/boot/efi/EFI/fedora/grub.cfg.new") = -1 EROFS (Read-only file system)
```
from the grub2 code.
https://github.com/projectatomic/rpm-ostree/issues/633
Closes: #694
Approved by: giuseppe
This commit is contained in:
parent
6b93cb3173
commit
c9356a50b8
|
|
@ -309,7 +309,10 @@ ot_gfile_ensure_unlinked (GFile *path,
|
|||
if (unlink (gs_file_get_path_cached (path)) != 0)
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
return FALSE;
|
||||
{
|
||||
glnx_set_error_from_errno (error);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue