Skip to content

Commit

Permalink
Update fileitem.go
Browse files Browse the repository at this point in the history
fix issue fyne-io#1235
  • Loading branch information
godcong committed Aug 5, 2020
1 parent aed3f3e commit f0cba82
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dialog/fileitem.go
Expand Up @@ -58,12 +58,15 @@ func (i *fileDialogItem) isDirectory() bool {

func (f *fileDialog) newFileItem(path string, dir bool) *fileDialogItem {
var icon fyne.CanvasObject
if dir {
var name string
if dir {
icon = canvas.NewImageFromResource(theme.FolderIcon())
name = filepath.Base(path)
} else {
icon = NewFileIcon(storage.NewURI("file://" + path))
name = fileName(path)
}
name := fileName(path)


ret := &fileDialogItem{
picker: f,
Expand Down

0 comments on commit f0cba82

Please sign in to comment.