Skip to content

Commit 32094fd

Browse files
author
Miguel Ruivo
authored
Merge pull request #924 from miguelpruivo/bug/buffer-for-selected-file-paths-too-small-on-windows
#918: buffer for selected file paths too small on windows
2 parents 9b75f40 + 8d19c9d commit 32094fd

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.2.8
2+
3+
##### Desktop (Windows)
4+
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)).
5+
6+
17
## 4.2.7
28

39
##### Desktop (macOS & Windows)

lib/src/windows/file_picker_windows.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class FilePickerWindows extends FilePicker {
229229
List<String>? allowedExtensions,
230230
FileType type = FileType.any,
231231
}) {
232-
final lpstrFileBufferSize = 20 * maximumPathLength;
232+
final lpstrFileBufferSize = 8192 * maximumPathLength;
233233
final Pointer<OPENFILENAMEW> openFileNameW = calloc<OPENFILENAMEW>();
234234

235235
openFileNameW.ref.lStructSize = sizeOf<OPENFILENAMEW>();

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
33
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
44
repository: https://github.com/miguelpruivo/flutter_file_picker
55
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
6-
version: 4.2.7
6+
version: 4.2.8
77

88
dependencies:
99
flutter:

0 commit comments

Comments
 (0)