Add "sqlapi" prefix to temporary dir for shapefile output

This commit is contained in:
Sandro Santilli 2012-10-31 11:56:55 +01:00
parent 4e0346a5a1
commit 110af3e9d9

View File

@ -411,7 +411,6 @@ function toOGR(dbname, user_id, gcol, sql, res, out_format, out_filename, callba
var dbpass = ''; // turn into a parameter..
var tmpdir = '/tmp'; // FIXME: make configurable
var outdirpath = tmpdir + '/shapefile-' + generateMD5(sql);
var columns = [];
Step (
@ -480,7 +479,7 @@ console.log(['ogr2ogr',
if ( code ) {
next(new Error("ogr2ogr returned an error (error code " + code + ")\n" + stderr));
} else {
next(null, outdirpath);
next(null);
}
});
},
@ -493,7 +492,7 @@ console.log(['ogr2ogr',
function toSHP(dbname, user_id, gcol, sql, res, callback) {
var zip = 'zip'; // FIXME: make configurable
var tmpdir = '/tmp'; // FIXME: make configurable
var outdirpath = tmpdir + '/shapefile-' + generateMD5(sql);
var outdirpath = tmpdir + '/sqlapi-shapefile-' + generateMD5(sql);
var shapefile = outdirpath + '/cartodb-query.shp';
// TODO: following tests: