mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-13 12:41:01 -04:00
document-portal: Treat newly created files (EXCL) as truncated ones
The EXCL pretty much guarantees it is a new file.
This commit is contained in:
@@ -701,7 +701,7 @@ xdp_inode_create_file (XdpInode *dir,
|
||||
inode->dir_fd = glnx_steal_fd (&dir_fd);
|
||||
inode->fd = glnx_steal_fd (&fd);
|
||||
inode->trunc_fd = glnx_steal_fd (&trunc_fd);
|
||||
if (inode->trunc_fd != -1 && truncate)
|
||||
if (inode->trunc_fd != -1 && (truncate || exclusive))
|
||||
{
|
||||
inode->truncated = TRUE;
|
||||
g_free (inode->backing_filename);
|
||||
|
||||
Reference in New Issue
Block a user