Улучшение отдачи файлов книг и статики
This commit is contained in:
@@ -13,15 +13,6 @@ module.exports = async(config) => {
|
||||
return;
|
||||
}
|
||||
|
||||
//сохраним files
|
||||
const filesDir = `${config.publicDir}/files`;
|
||||
let tmpFilesDir = '';
|
||||
if (await fs.pathExists(filesDir)) {
|
||||
tmpFilesDir = `${config.dataDir}/files`;
|
||||
if (!await fs.pathExists(tmpFilesDir))
|
||||
await fs.move(filesDir, tmpFilesDir);
|
||||
}
|
||||
|
||||
await fs.remove(config.publicDir);
|
||||
|
||||
//извлекаем новый webApp
|
||||
@@ -35,10 +26,6 @@ module.exports = async(config) => {
|
||||
await zipReader.close();
|
||||
}
|
||||
|
||||
//восстановим files
|
||||
if (tmpFilesDir)
|
||||
await fs.move(tmpFilesDir, filesDir);
|
||||
|
||||
await fs.writeFile(verFile, config.version);
|
||||
await fs.remove(zipFile);
|
||||
};
|
||||
Reference in New Issue
Block a user