Skip to content

Commit

Permalink
Merge pull request #924 from miguelpruivo/bug/buffer-for-selected-fil…
Browse files Browse the repository at this point in the history
…e-paths-too-small-on-windows

#918: buffer for selected file paths too small on windows
  • Loading branch information
Miguel Ruivo authored Dec 16, 2021
2 parents 9b75f40 + 8d19c9d commit 32094fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.2.8

##### Desktop (Windows)
Fixes the issue under Windows that the user could not select more than about 256 files (depending on the length of the file paths) because the buffer size for storing the selected file paths was too small. ([#918](https://github.com/miguelpruivo/flutter_file_picker/issues/918)).


## 4.2.7

##### Desktop (macOS & Windows)
Expand Down
2 changes: 1 addition & 1 deletion lib/src/windows/file_picker_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class FilePickerWindows extends FilePicker {
List<String>? allowedExtensions,
FileType type = FileType.any,
}) {
final lpstrFileBufferSize = 20 * maximumPathLength;
final lpstrFileBufferSize = 8192 * maximumPathLength;
final Pointer<OPENFILENAMEW> openFileNameW = calloc<OPENFILENAMEW>();

openFileNameW.ref.lStructSize = sizeOf<OPENFILENAMEW>();
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
repository: https://github.com/miguelpruivo/flutter_file_picker
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
version: 4.2.7
version: 4.2.8

dependencies:
flutter:
Expand Down

0 comments on commit 32094fd

Please sign in to comment.