Repository: flutter
Issue: [tool_crash]  FileSystemException: FileSystemException: Cannot create file, path = 'reports\coverage' (OS Error: Access is denied. , errno = 5)
Labels: a: tests,c: crash,tool,platform-windows,P2,team-tool,triaged-tool

Okay, I did already check to make sure that windows folder control access system setting is at off. No commercial virus apps running.  Just it will not do flutter test --coverage --coverage-path it does flutter test --coverage with no errors...and yes the folder path exists as I create that at project creation


it's not immediate but here is the full log:

Flutter crash report.
Please report a bug at https://github.com/flutter/flutter/issues.

## command

flutter test --coverage --coverage-path reports\coverage

## exception

FileSystemException: FileSystemException: Cannot create file, path = 'reports\coverage' (OS Error: Access is denied.
, errno = 5)

```
#0      _File.throwIfError (dart:io/file_impl.dart:635:7)
#1      _File.createSync (dart:io/file_impl.dart:273:5)
#2      ForwardingFile.createSync (package:file/src/forwarding/forwarding_file.dart:24:16)
#3      ForwardingFile.createSync (package:file/src/forwarding/forwarding_file.dart:24:16)
#4      CoverageCollector.collectCoverageData (package:flutter_tools/src/test/coverage_collector.dart:148:9)
<asynchronous suspension>
#5      TestCommand.runCommand (package:flutter_tools/src/commands/test.dart:293:53)
<asynchronous suspension>
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
#7      _rootRunUnary (dart:async/zone.dart:1198:47)
#8      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#12     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#13     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#14     _rootRun (dart:async/zone.dart:1190:13)
#15     _CustomZone.run (dart:async/zone.dart:1093:19)
#16     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#20     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
```

## flutter doctor

```
[âœ“] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
    â€¢ Flutter version 1.22.6 at D:\fluttersdk\myfluttersdk\flutter
    â€¢ Framework revision 9b2d32b605 (3 weeks ago), 2021-01-22 14:36:39 -0800
    â€¢ Engine revision 2f0af37152
    â€¢ Dart version 2.10.5

[âœ“] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    â€¢ Android SDK at D:\androidstuff\androidsdk
    â€¢ Platform android-30, build-tools 30.0.3
    â€¢ ANDROID_SDK_ROOT = D:\androidstuff\androidsdk
    â€¢ Java binary at: D:\myOpt\AmazonCorretto\jdk1.8.0_282\bin\java
    â€¢ Java version OpenJDK Runtime Environment Corretto-8.282.08.1 (build 1.8.0_282-b08)
    â€¢ All Android licenses accepted.

[!] Android Studio (not installed)
    â€¢ Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[âœ“] VS Code (version 1.52.1)
    â€¢ VS Code at C:\Users\fgrott\AppData\Local\Programs\Microsoft VS Code
    â€¢ Flutter extension version 3.18.1

[âœ“] VS Code, 64-bit edition (version 1.22.2)
    â€¢ VS Code at C:\Program Files\Microsoft VS Code
    â€¢ Flutter extension version 3.18.1

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.