From bd515642cd28e670720b08ef9e9b3064712662c9 Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Sun, 28 Jan 2018 17:55:21 +0100 Subject: [PATCH] minor fix --- src/core/vfs.coffee | 2 +- src/packages/CoreServices/PushNotification.coffee | 2 +- src/packages/Files/main.coffee | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/vfs.coffee b/src/core/vfs.coffee index 97cc9e8..b3bbf59 100644 --- a/src/core/vfs.coffee +++ b/src/core/vfs.coffee @@ -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 diff --git a/src/packages/CoreServices/PushNotification.coffee b/src/packages/CoreServices/PushNotification.coffee index 802104f..10adc23 100644 --- a/src/packages/CoreServices/PushNotification.coffee +++ b/src/packages/CoreServices/PushNotification.coffee @@ -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 diff --git a/src/packages/Files/main.coffee b/src/packages/Files/main.coffee index aa288b3..a1177ac 100644 --- a/src/packages/Files/main.coffee +++ b/src/packages/Files/main.coffee @@ -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()