fix script download
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Mon, 25 Oct 2010 18:01:24 +0000 (18:01 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Mon, 25 Oct 2010 18:01:24 +0000 (18:01 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@612 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/script/jsengine.cpp

index a3d4d83..d1e034d 100644 (file)
@@ -156,6 +156,7 @@ static inline void clearDir(QString dn)
 void MScriptEngine::initScriptPath()
 {
        QSettings set;
+       qDebug()<<"initializing script environment";
        //retrieve settings (or defaults)
        set.beginGroup(req->configSettingsGroup()+"/script");
        QMultiMap<int,QString>paths;
@@ -171,11 +172,13 @@ void MScriptEngine::initScriptPath()
        for(int i=0;i<=100;i++)
                if(paths.contains(i))
                        m_basepath<<paths.values(i);
+       qDebug()<<"script environment: allowserver="<<allowserver<<"basepaths="<<m_basepath;
        //retrieve scripts
        if(!allowserver)return;
+       qDebug()<<"attempting to get scripts from server";
        MTemplateStore*store=req->templateStore();
        if(store==0)return;
-       QString fn=store->getTemplate("scripts.zip").cacheFileName();
+       QString fn=store->getTemplate("scripts").cacheFileName();
        if(fn=="")return;
        QFile fd(fn);
        if(!fd.open(QIODevice::ReadOnly))return;