Skip to content

Commit

Permalink
🐛 Data sync may cause data loss on Android 14 siyuan-note/siyuan#10205
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 21, 2024
1 parent e29c043 commit 854f307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,8 @@ func (repo *Repo) putFileChunks(file *entity.File, context map[string]interface{
}

newSize := newInfo.Size()
newUpdated := newInfo.ModTime().UnixMilli()
if file.Size != newSize || file.Updated != newUpdated {
newUpdated := newInfo.ModTime().Unix()
if file.Size != newSize || file.SecUpdated() != newUpdated {
logging.LogErrorf("file changed [%s], size [%d -> %d], updated [%d -> %d]", absPath, file.Size, newSize, file.Updated, newUpdated)
err = ErrIndexFileChanged
return
Expand Down

0 comments on commit 854f307

Please sign in to comment.