Skip to content
Commit d248949e authored by Kevin Ottens's avatar Kevin Ottens Committed by Kevin Ottens
Browse files

Don't unlink + rename on CIFS mounts during copy operations

It turns out that the behavior of unlink() on CIFS mounts can be a bit
"interesting". If the file one tries to unlink is opened then the
operation is claimed to have succeeded but the filename is still visible
in the file hierarchy until the last handle is closed.

Since we rightfully attempt to copy under a temporary name + unlink +
rename during copy() operations this would end badly (as the unlink()
would "succeed" but the rename() would fail!). For instance Okular would
constantly hit this case but it's likely not the only one to be affected.

So instead we detect if the destination is a CIFS mount, in such cases
we now overwrite the file directly since this actually succeed.

BUG: 454693
parent cff70f3b
Pipeline #466233 passed with stage
in 14 minutes and 43 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment