Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

...
 
Commits (1)
......@@ -23,7 +23,7 @@ function pick_file()
var fctx = {};
function do_pick_file(dir) {
var filedir = new FileBase(dir);
var filedir = new OldFileBase(dir);
var files;
var file;
......
......@@ -27,7 +27,7 @@
var FM_EXTDESC = 1;
var FM_ANON = (1<<1);
function FileBase(dir) {
function OldFileBase(dir) {
var f = new File(format("%s%s.ixb", file_area.dir[dir].data_dir, dir));
var dat = new File(format("%s%s.dat", file_area.dir[dir].data_dir, dir));
var exb = new File(format("%s%s.exb", file_area.dir[dir].data_dir, dir));
......
......@@ -4,7 +4,7 @@
* NEW lists ones newer than 10 days.
*/
require("filebase.js", 'FileBase');
require("filebase.js", 'OldFileBase');
var FREQIT = {
dircache:{},
......@@ -22,7 +22,7 @@ var FREQIT = {
if (magic.secure && !protected)
return;
if (this.dircache[magic.dir] === undefined)
this.dircache[magic.dir] = new FileBase(magic.dir);
this.dircache[magic.dir] = new OldFileBase(magic.dir);
this.dircache[magic.dir].forEach(function(fent) {
if (wildmatch(fent.name, magic.match, true)) {
if (file === undefined || fent.uldate > file.uldate)
......@@ -44,7 +44,7 @@ var FREQIT = {
function handle_list(list) {
list.forEach(function(dir) {
if (self.dircache[dir] === undefined)
self.dircache[dir] = new FileBase(dir);
self.dircache[dir] = new OldFileBase(dir);
self.dircache[dir].forEach(function(fent) {
if (wildmatch(fent.name, match, true))
self.add_file(fent.path, cb_data, cfg);
......
require('filebase.js', 'FileBase');
require('filebase.js', 'OldFileBase');
require('file_size.js', 'file_size_str');
function count_files(dir) {
......@@ -29,7 +29,7 @@ function listDirectories(lib) {
}
function listFiles(dir) {
return (new FileBase(file_area.dir[dir].code)).map(function (df) {
return (new OldFileBase(file_area.dir[dir].code)).map(function (df) {
df.size = df.path ? file_size_str(file_size(df.path)) : 'Unknown';
df._size = df.path ? file_size(df.path) : 0;
return df;
......@@ -47,4 +47,4 @@ function getMimeType(file) {
}
}
return 'application/octet-stream';
}
\ No newline at end of file
}
......@@ -5,7 +5,7 @@ load(settings.web_directory + '/lib/init.js');
load(settings.web_lib + 'auth.js');
load(settings.web_lib + 'files.js');
var request = require({}, settings.web_lib + 'request.js', 'request');
var Filebase = require({}, 'filebase.js', 'FileBase');
var Filebase = require({}, 'filebase.js', 'OldFileBase');
var CHUNK_SIZE = 1024;
......@@ -22,7 +22,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') && request
) {
var dircode = file_area.dir[dir].code;
var fn = request.get_param('file').toLowerCase();
var fileBase = new FileBase(dircode);
var fileBase = new OldFileBase(dircode);
var file = null;
fileBase.some(function (e) {
if (e.name.toLowerCase() !== fn) {
......@@ -81,4 +81,4 @@ http_reply.header['Content-Type'] = 'application/json';
http_reply.header['Content-Length'] = reply.length;
write(reply);
reply = undefined;
\ No newline at end of file
reply = undefined;