Skip to content

Commit

Permalink
Update fileitem.go (#1236)
Browse files Browse the repository at this point in the history
fix issue #1235
  • Loading branch information
godcong committed Aug 5, 2020
1 parent 9dd8adb commit 03c362c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dialog/fileitem.go
Expand Up @@ -58,12 +58,14 @@ func (i *fileDialogItem) isDirectory() bool {

func (f *fileDialog) newFileItem(path string, dir bool) *fileDialogItem {
var icon fyne.CanvasObject
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 03c362c

Please sign in to comment.