Browse Source
When writing a symlink the stat data should only be written once into the DirCacheEntry, based on the symlink itself and not the possibly resolved destination observed by java.io.File. Refactor the code to handle symlinks and early return. This removes the risk the blob stat info update is used against a newly checked out symlink. Hoist the file length stat update immediately after writing the file, before a rename. This eliminates any race caused by another process updating the file length after the rename and having it to fall into the racily clean path. Change-Id: I978ad9719c018ce1cf26947efbabaa8b9dff2217stable-3.6
Shawn Pearce
10 years ago
committed by
Shawn Pearce
1 changed files with 31 additions and 33 deletions
Loading…
Reference in new issue