Several changes have been implemented to avoid the Delete operations described in KDESKTOP-1019:
We do not delete dehydrated placeholders that the app tried to upload. Instead, we rename them appending the "blacklisted" suffix, so that they are excluded from sync.
We do not set a status to a file which is being uploaded. Therefore, in the Finder, the files will not have any statuses until the end of the upload.
Finally, we reinforce the detection of dehydrated placeholders by also retrieving the number of memory blocks used that is the number st_blocks obtained from the call to lstat. Therefore, a placeholder is considered dehydrated only if this number is 0. Finally, the use of st_blocks was misleading for files with thumbnails. Indeed, dehydrated placeholder with a thumbnail has a st_blocks value higher than 0.
Several changes have been implemented to avoid the Delete operations described in KDESKTOP-1019:
Finally, we reinforce the detection of dehydrated placeholders by also retrieving the number of memory blocks used that is the numberFinally, the use ofst_blocks
obtained from the call tolstat
. Therefore, a placeholder is considered dehydrated only if this number is0
.st_blocks
was misleading for files with thumbnails. Indeed, dehydrated placeholder with a thumbnail has ast_blocks
value higher than 0.