« Previous | Next » 

Revision 55c7ac7a

Parent a502593b
Child 71effda5

Added by Robert Lemke over 6 years ago

[BUGFIX] Files::unlink() raises error if file does not exist anymore

This fixes an issue with Files::unlink() which may signal an error when
trying to delete a file which does not exist anymore. A typical scenario
for this to happen is if a file-based cache is flushed in separately
running processes at the same time (race condition).

The new implementation of unlink() will catch errors occurred during
the first try of unlinking the file, then clear the stat cache and
check if the file still exists. If it does, this means the file couldn't
be unlinked and FALSE is returned. If the file does not exist anymore,
the method assumes that it has been deleted by other means already and
returns TRUE.

Change-Id: Idc014099e2d994994783fb3552b77cd64994b5b4
Releases: master, 3.0
Resolves: FLOW-283

  • added
  • modified
  • copied
  • renamed
  • deleted