Fixed an issue where files could not be filed (#6754)

* Fixed an issue where files could not be filed

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
多啦b梦 2023-12-12 04:31:34 +08:00 committed by GitHub
parent 3240d042e9
commit a1b966edf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": patch
---
fix:Fixed an issue where files could not be filed

View File

@ -197,7 +197,7 @@ class FileExplorer(Component):
ignore_files = []
if self.ignore_glob:
for result in expand_braces(self.ignore_glob):
ignore_files += list(Path(self.ignore_glob).resolve().glob(result))
ignore_files += list(Path(self.root).resolve().glob(result))
files = list(set(files) - set(ignore_files))
tree = make_tree([str(f.relative_to(self.root)) for f in files])