fix remote file loading

This commit is contained in:
Lisa Milne 2023-12-06 09:45:55 +10:00
parent bbf92c58ec
commit 1536bb264d

View file

@ -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);