mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-26 08:38:20 -05:00
document-portal: Fix file trucation
We were checking the error return in the wrong way.
This commit is contained in:
@@ -1744,7 +1744,7 @@ truncateat (int dir_fd, const char *filename, int size)
|
||||
int errsv, res;
|
||||
|
||||
fd = openat (dir_fd, filename, O_RDWR);
|
||||
if (fd != -1)
|
||||
if (fd == -1)
|
||||
return -1;
|
||||
|
||||
res = ftruncate (fd, size);
|
||||
|
||||
Reference in New Issue
Block a user