)]}'
{
  "commit": "e5792f6805839a1d84c5f4414dc036c480189651",
  "tree": "e9093957b55219440ac815278f6754ed8441af54",
  "parents": [
    "663073102f803d9d179fcf0a9123d783077d75cc"
  ],
  "author": {
    "name": "flutteractionsbot",
    "email": "154381524+flutteractionsbot@users.noreply.github.com",
    "time": "Mon Oct 26 14:34:07 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Oct 26 21:34:07 2026 +0000"
  },
  "message": "[beta] [flutter_tools] Exit cleanly when Windows path exceeds MAX_PATH (OS Error 206) (#195072)\n\nThis pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)\nPlease fill in the form below, and a flutter domain expert will evaluate this cherry pick request.\n\n### Issue Link:\nhttps://github.com/flutter/flutter/issues/194570\n\n### Impact Description:\nWhen a Flutter project, SDK, or subprocess command path on Windows exceeds `MAX_PATH` (260 characters), Win32 process and file operations fail with OS error code `206` (`ERROR_FILENAME_EXCED_RANGE`: `The filename or extension is too long`). Previously, `_handleWindowsException` in `error_handling_io.dart` did not recognize error code `206`, causing `ErrorHandlingProcessManager` and `ErrorHandlingFileSystem` to rethrow an unhandled `ProcessPackageException` or `FileSystemException` and trigger a crash report (#10 top crasher in Flutter 3.47.7). This change handles error code `206` and exits cleanly with a `ToolExit` message guiding the user to move the Flutter SDK and/or project to a shorter path or enable long paths on Windows.\n\n### Changelog Description:\n[flutter/194570] When a path or command exceeds `MAX_PATH` on Windows (OS Error 206), `flutter_tools` crashed with an unhandled `ProcessPackageException` or `FileSystemException` instead of exiting cleanly with an actionable error message.\n\n### Workaround:\nMove the Flutter SDK and/or project to a shorter directory path, enable Windows Long Paths, or set `PUB_CACHE` / delete `$FLUTTER_ROOT/.pub-preload-cache` if hit during initial pub cache preload.\n\n### Risk:\nWhat is the risk level of this cherry-pick?\n\n### Test Coverage:\nAre you confident that your fix is well-tested by automated tests?\n\n### Validation Steps:\nRun a `flutter` command (such as `flutter pub get`) on Windows where a file or subprocess command fails with OS error `206` (`ERROR_FILENAME_EXCED_RANGE`), or run `flutter test test/general.shard/base/error_handling_io_test.dart`, and verify that `flutter_tools` exits cleanly with a `ToolExit` message rather than an unhandled exception crash.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e68355a888181f4fd015b97386e0058e69dc4ad9",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/base/error_handling_io.dart",
      "new_id": "de2887bc2ccaa2457e513c5fc02415d60ac022f3",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/base/error_handling_io.dart"
    },
    {
      "type": "modify",
      "old_id": "6e75269944cb29b33954d7f9dc41d547c5b90c39",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/general.shard/base/error_handling_io_test.dart",
      "new_id": "5aee959a18f1a09559754aba845b906295d457bc",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/general.shard/base/error_handling_io_test.dart"
    }
  ]
}
