mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
fix remote file loading
This commit is contained in:
parent
bbf92c58ec
commit
1536bb264d
1 changed files with 6 additions and 4 deletions
|
|
@ -40,9 +40,11 @@ var clite = {
|
|||
},
|
||||
file:function(name,callback) {
|
||||
if (window.location.protocol == 'file:') { // this is a dirty hack and I hate it, just let me open a file: path!
|
||||
clite.term.setCustom({type:'file',callback:callback});
|
||||
//clite.term.setCustom({type:'file',callback:callback});
|
||||
//clite.shell.writeLine('open file: '+name);
|
||||
return;
|
||||
//return;
|
||||
|
||||
// fuck it, I'll just update about:config in firefox
|
||||
}
|
||||
|
||||
fetch(name+'?d='+(new Date).getTime())
|
||||
|
|
@ -935,8 +937,8 @@ clite.io = {
|
|||
if (typeof cb === 'function') {
|
||||
fd.remote.callback = cb;
|
||||
if (fd.remote.ispending) {
|
||||
clite.core.load.file(n.data.remote,function(d) {
|
||||
n.data.content = d;
|
||||
clite.core.load.file(fd.node.data.remote,function(d) {
|
||||
fd.node.data.content = d;
|
||||
fd.remote.ispending = false;
|
||||
try{
|
||||
fd.remote.callback(fd);
|
||||
|
|
|
|||
Loading…
Reference in a new issue