Fixed bug that prevented subscription archives from being downloaded if their path was express as a full path

This commit is contained in:
Isaac Grynsztein
2020-06-23 00:01:23 -04:00
parent 2998562655
commit 94df98e5d0

View File

@@ -2537,7 +2537,7 @@ app.post('/api/downloadArchive', async (req, res) => {
let sub = req.body.sub;
let archive_dir = sub.archive;
let full_archive_path = path.join(__dirname, archive_dir, 'archive.txt');
let full_archive_path = path.join(archive_dir, 'archive.txt');
if (fs.existsSync(full_archive_path)) {
res.sendFile(full_archive_path);