minor fix

This commit is contained in:
Xuan Sang LE 2018-01-28 17:55:21 +01:00
parent 60bae901a0
commit bd515642cd
3 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class BasicFileHandler
setPath: (p) ->
@ready = false
return unless p
@path = p
@path = p.toString()
list = @path.split ":///"
@protocol = list[0]
return unless list.length > 1

View File

@ -27,7 +27,7 @@ class PushNotification extends this.OS.GUI.BaseService
@nzone = @find "notifyzone"
@fzone = @find "feedzone"
(@find "btclear").set "onbtclick", (e) -> me.mlist.set "items", []
@subscribe "fail", (e) -> console.log e
#@subscribe "fail", (e) -> console.log e
@subscribe "notification", (o) -> me.pushout 'INFO', o
@subscribe "fail", (o) -> me.pushout 'FAIL', o
@subscribe "error", (o) -> me.pushout 'ERROR', o

View File

@ -22,7 +22,8 @@ class Files extends this.OS.GUI.BaseApplication
#console.log e
me._gui.openWith e
@favo.set "onlistselect", (e) -> me.chdir e.data.path
@favo.set "onlistselect", (e) ->
me.chdir e.data.path
($ @find "btback").click () ->
return if me.currdir.isRoot()
@ -60,12 +61,13 @@ class Files extends this.OS.GUI.BaseApplication
@toggleSidebar @setting.sidebar
@toggleNav @setting.nav
chdir: (p, push) ->
chdir: (p) ->
me = @
dir = if p then p.asFileHandler() else me.currdir
dir.read (d) ->
if(d.error)
return me.error "Resource not found #{p}"
console.log "error"
me.currdir = dir
if not dir.isRoot()
p = dir.parent().asFileHandler()