forked from GitHub/gf-core
gfse: grammars in the cloud, work in progress
Cloud merging: when sharing grammars between two devices that previously each had separate grammar directoies on the server, clean up one of the directories and make it a symbolic link to the other.
This commit is contained in:
@@ -969,7 +969,12 @@ function download_from_cloud() {
|
||||
var newdir="/tmp/"+location.hash.substr(1)
|
||||
local.put("dir",newdir);
|
||||
if(olddir && uploaded && newdir!=olddir) {
|
||||
upload_json(function(){download_json(newdir)})
|
||||
function download() { download_json(newdir) }
|
||||
function rmolddir(){
|
||||
ajax_http_get("upload.cgi?rmdir="+olddir+"&newdir="+newdir,
|
||||
download,download)
|
||||
}
|
||||
upload_json(rmolddir)
|
||||
}
|
||||
else download_json(newdir)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user