This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 94a3715  fix file filters for FileReference.browse.  Should fix #865
94a3715 is described below

commit 94a371540e6e464c1c08dc37663af3550c4255a0
Author: Alex Harui <[email protected]>
AuthorDate: Sat Jun 13 11:08:28 2020 -0700

    fix file filters for FileReference.browse.  Should fix #865
---
 .../projects/MXRoyale/src/main/royale/mx/net/FileReference.as    | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/net/FileReference.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/net/FileReference.as
index 636581a..2ef9931 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/net/FileReference.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/net/FileReference.as
@@ -64,6 +64,15 @@ package mx.net
                        {
                                var fileFilter:FileFilter = typeFilter[i] as 
FileFilter;
                                var filters:Array = 
fileFilter.extension.split(";");
+                               for (var j:int = 0; j < filters.length; j++)
+                               {
+                                       var filter:String = filters[j];
+                                       if (filter.charAt(0) == '*')
+                                       {
+                                               filter = filter.substring(1);
+                                               filters[j] = filter;
+                                       }
+                               }
                                allFilters = allFilters.concat(filters);
                        }
                        _browser.filter = allFilters.join(",");

Reply via email to