)]}'
{
  "commit": "e5a485c67fdef607ec0ae9ea37c5a166aac9c4df",
  "tree": "bcb630d52dbcab3efa66e42cbaec10a23774455f",
  "parents": [
    "ed625e3d446800a8f66fe106697bc7978fe3f724"
  ],
  "author": {
    "name": "pcloudy",
    "email": "pcloudy@google.com",
    "time": "Thu Apr 18 08:17:25 2019 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Apr 18 08:19:08 2019 -0700"
  },
  "message": "Windows, file.cc: Make DeletePath simpler and more robust\n\nOld behavior:\n\nFirst try to delete the path by DeleteFileW, if it fails, check the error code and the file attribute to tell what\u0027s the reason. Then if it\u0027s a directory, try to delete it with RemoveDirectoryW, and if it\u0027s a file, try to remove read-only attribute and delete file again.\n\nThis is sometimes flaky because the GetFileAttributesW function could fail with access denied error after the first DeleteFileW call if the file is only marked as deleted but not yet deleted.\n\nNew behavior:\n\n1. Check the file attribute first to see if we should use DeleteFileW (for file and symlink) or RemoveDirectoryW (for directory and junction).\n2. If it\u0027s a directory, try to delete it in a robust way (check the directory status first, retry if necessary)\n3. If it\u0027s a file, remove the read-only attribute if necessary and try to delete it.\n\nRELNOTES: None\nPiperOrigin-RevId: 244188343\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "04ec6c521251c4438537799653209be80757aeac",
      "old_mode": 33188,
      "old_path": "src/main/native/windows/file.cc",
      "new_id": "e9b842a1189c4a1723bb12dfb78dd09b0754eaf9",
      "new_mode": 33188,
      "new_path": "src/main/native/windows/file.cc"
    }
  ]
}
