From b690afe33ea3ad86641f58f5e2d757609087c2bc Mon Sep 17 00:00:00 2001 From: Miguel Ruivo Date: Thu, 22 Oct 2020 11:07:24 +0100 Subject: [PATCH] Adds missing extension to name property of PlatformFile (#444) --- CHANGELOG.md | 3 +++ ios/Classes/FileUtils.m | 2 +- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58f1e63..0546d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.0.10 +Adds missing extension to `name` property of `PlatformFile`. ([#444](https://github.com/miguelpruivo/flutter_file_picker/issues/444)) + ## 2.0.9+1 Minor fix on CHANGELOG regarding version `2.0.9`. diff --git a/ios/Classes/FileUtils.m b/ios/Classes/FileUtils.m index a25cf1b..21bc214 100644 --- a/ios/Classes/FileUtils.m +++ b/ios/Classes/FileUtils.m @@ -89,7 +89,7 @@ NSDictionary * fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil]; [files addObject: [[[FileInfo alloc] initWithPath: path - andName: [[path lastPathComponent] stringByDeletingPathExtension] + andName: [path lastPathComponent] andSize: [NSNumber numberWithLongLong: [@(fileAttributes.fileSize) longLongValue] / 1024] andData: loadData ? [NSData dataWithContentsOfFile:path options: 0 error:nil] : nil] toData]]; } diff --git a/pubspec.yaml b/pubspec.yaml index 25b2f4f..6a3ae25 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: file_picker description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extension filtering support. homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker -version: 2.0.9+1 +version: 2.0.10 dependencies: flutter: