Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d98251e34a | ||
|
|
1eea4e8fc1 | ||
|
|
da330bc615 | ||
|
|
1134250954 | ||
|
|
d8fddd4128 | ||
|
|
42656cd690 | ||
|
|
746f9517d9 | ||
|
|
2a373de5f5 | ||
|
|
b507f00929 | ||
|
|
aea8a254bf | ||
|
|
4247665ba4 | ||
|
|
d59d0a6a42 | ||
|
|
8d40ed0bda | ||
|
|
67bc893e22 | ||
|
|
0f5d3b34a5 |
@@ -4,7 +4,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><b>F1, H</b> - открыть справку</li>
|
<li><b>F1, H</b> - открыть справку</li>
|
||||||
<li><b>Escape</b> - показать/скрыть страницу загрузки</li>
|
<li><b>Escape</b> - показать/скрыть страницу загрузки</li>
|
||||||
<li><b>Tab</b> - показать/скрыть панель управления</li>
|
<li><b>Tab, Q</b> - показать/скрыть панель управления</li>
|
||||||
<li><b>PageUp, Left, Shift+Space, Backspace</b> - страницу назад</li>
|
<li><b>PageUp, Left, Shift+Space, Backspace</b> - страницу назад</li>
|
||||||
<li><b>PageDown, Right, Space</b> - страницу вперед</li>
|
<li><b>PageDown, Right, Space</b> - страницу вперед</li>
|
||||||
<li><b>Home</b> - в начало книги</li>
|
<li><b>Home</b> - в начало книги</li>
|
||||||
|
|||||||
@@ -103,6 +103,13 @@ class LoaderPage extends Vue {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.type == 'keydown' && (document.activeElement !== input && event.code == 'KeyQ')) {
|
||||||
|
this.$emit('tool-bar-toggle');
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -930,6 +930,7 @@ class TextPage extends Vue {
|
|||||||
this.$emit('full-screen-toogle');
|
this.$emit('full-screen-toogle');
|
||||||
break;
|
break;
|
||||||
case 'Tab':
|
case 'Tab':
|
||||||
|
case 'KeyQ':
|
||||||
this.doToolBarToggle();
|
this.doToolBarToggle();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import he from 'he';
|
|||||||
import sax from '../../../../server/core/BookConverter/sax';
|
import sax from '../../../../server/core/BookConverter/sax';
|
||||||
import {sleep} from '../../../share/utils';
|
import {sleep} from '../../../share/utils';
|
||||||
|
|
||||||
|
const maxImageLineCount = 100;
|
||||||
|
|
||||||
export default class BookParser {
|
export default class BookParser {
|
||||||
constructor() {
|
constructor() {
|
||||||
// defaults
|
// defaults
|
||||||
@@ -37,6 +39,10 @@ export default class BookParser {
|
|||||||
let center = false;
|
let center = false;
|
||||||
let bold = false;
|
let bold = false;
|
||||||
let italic = false;
|
let italic = false;
|
||||||
|
this.binary = {};
|
||||||
|
let binaryId = '';
|
||||||
|
let binaryType = '';
|
||||||
|
let dimPromises = [];
|
||||||
|
|
||||||
let paraIndex = -1;
|
let paraIndex = -1;
|
||||||
let paraOffset = 0;
|
let paraOffset = 0;
|
||||||
@@ -50,6 +56,28 @@ export default class BookParser {
|
|||||||
addIndex: Number, //индекс добавляемого пустого параграфа (addEmptyParagraphs)
|
addIndex: Number, //индекс добавляемого пустого параграфа (addEmptyParagraphs)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
const getImageDimensions = (binaryId, binaryType, data) => {
|
||||||
|
return new Promise (async(resolve, reject) => {
|
||||||
|
const i = new Image();
|
||||||
|
let resolved = false;
|
||||||
|
i.onload = () => {
|
||||||
|
resolved = true;
|
||||||
|
this.binary[binaryId] = {
|
||||||
|
w: i.width,
|
||||||
|
h: i.height,
|
||||||
|
type: binaryType,
|
||||||
|
data
|
||||||
|
};
|
||||||
|
resolve();
|
||||||
|
};
|
||||||
|
|
||||||
|
i.src = `data:${binaryType};base64,${data}`;
|
||||||
|
await sleep(30*1000);
|
||||||
|
if (!resolved)
|
||||||
|
reject('Не удалось получить размер изображения');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const newParagraph = (text, len, addIndex) => {
|
const newParagraph = (text, len, addIndex) => {
|
||||||
paraIndex++;
|
paraIndex++;
|
||||||
let p = {
|
let p = {
|
||||||
@@ -103,13 +131,26 @@ export default class BookParser {
|
|||||||
paraOffset += p.length;
|
paraOffset += p.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onStartNode = (elemName) => {// eslint-disable-line no-unused-vars
|
const onStartNode = (elemName, tail) => {// eslint-disable-line no-unused-vars
|
||||||
if (elemName == '?xml')
|
if (elemName == '?xml')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tag = elemName;
|
tag = elemName;
|
||||||
path += '/' + elemName;
|
path += '/' + elemName;
|
||||||
|
|
||||||
|
if (tag == 'binary') {
|
||||||
|
let attrs = sax.getAttrsSync(tail);
|
||||||
|
binaryType = (attrs['content-type'].value ? attrs['content-type'].value : '');
|
||||||
|
if (binaryType == 'image/jpeg' || binaryType == 'image/png')
|
||||||
|
binaryId = (attrs.id.value ? attrs.id.value : '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag == 'image') {
|
||||||
|
let attrs = sax.getAttrsSync(tail);
|
||||||
|
if (attrs.href.value)
|
||||||
|
newParagraph(`<image href="${attrs.href.value}">${' '.repeat(maxImageLineCount)}</image>`, maxImageLineCount);
|
||||||
|
}
|
||||||
|
|
||||||
if (path.indexOf('/fictionbook/body') == 0) {
|
if (path.indexOf('/fictionbook/body') == 0) {
|
||||||
if (tag == 'title') {
|
if (tag == 'title') {
|
||||||
newParagraph(' ', 1);
|
newParagraph(' ', 1);
|
||||||
@@ -146,6 +187,10 @@ export default class BookParser {
|
|||||||
|
|
||||||
const onEndNode = (elemName) => {// eslint-disable-line no-unused-vars
|
const onEndNode = (elemName) => {// eslint-disable-line no-unused-vars
|
||||||
if (tag == elemName) {
|
if (tag == elemName) {
|
||||||
|
if (tag == 'binary') {
|
||||||
|
binaryId = '';
|
||||||
|
}
|
||||||
|
|
||||||
if (path.indexOf('/fictionbook/body') == 0) {
|
if (path.indexOf('/fictionbook/body') == 0) {
|
||||||
if (tag == 'title') {
|
if (tag == 'title') {
|
||||||
bold = false;
|
bold = false;
|
||||||
@@ -245,6 +290,10 @@ export default class BookParser {
|
|||||||
growParagraph(`${tOpen}${text}${tClose}`, text.length);
|
growParagraph(`${tOpen}${text}${tClose}`, text.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (binaryId) {
|
||||||
|
dimPromises.push(getImageDimensions(binaryId, binaryType, text));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onProgress = async(prog) => {
|
const onProgress = async(prog) => {
|
||||||
@@ -256,6 +305,14 @@ export default class BookParser {
|
|||||||
onStartNode, onEndNode, onTextNode, onProgress
|
onStartNode, onEndNode, onTextNode, onProgress
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (dimPromises.length) {
|
||||||
|
try {
|
||||||
|
await Promise.all(dimPromises);
|
||||||
|
} catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.fb2 = fb2;
|
this.fb2 = fb2;
|
||||||
this.para = para;
|
this.para = para;
|
||||||
|
|
||||||
@@ -292,18 +349,26 @@ export default class BookParser {
|
|||||||
splitToStyle(s) {
|
splitToStyle(s) {
|
||||||
let result = [];/*array of {
|
let result = [];/*array of {
|
||||||
style: {bold: Boolean, italic: Boolean, center: Boolean},
|
style: {bold: Boolean, italic: Boolean, center: Boolean},
|
||||||
|
image: Boolean,
|
||||||
|
imageId: String,
|
||||||
text: String,
|
text: String,
|
||||||
}*/
|
}*/
|
||||||
let style = {};
|
let style = {};
|
||||||
|
let image = {};
|
||||||
|
|
||||||
|
/*let attrs = sax.getAttrsSync(tail);
|
||||||
|
if (attrs.href.value)
|
||||||
|
newParagraph(' '.repeat(maxImageLineCount) + `<image href="${attrs.href.value}" />`, maxImageLineCount);
|
||||||
|
*/
|
||||||
const onTextNode = async(text) => {// eslint-disable-line no-unused-vars
|
const onTextNode = async(text) => {// eslint-disable-line no-unused-vars
|
||||||
result.push({
|
result.push({
|
||||||
style: Object.assign({}, style),
|
style: Object.assign({}, style),
|
||||||
text: text
|
image,
|
||||||
|
text
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onStartNode = async(elemName) => {// eslint-disable-line no-unused-vars
|
const onStartNode = async(elemName, tail) => {// eslint-disable-line no-unused-vars
|
||||||
switch (elemName) {
|
switch (elemName) {
|
||||||
case 'strong':
|
case 'strong':
|
||||||
style.bold = true;
|
style.bold = true;
|
||||||
@@ -314,6 +379,9 @@ export default class BookParser {
|
|||||||
case 'center':
|
case 'center':
|
||||||
style.center = true;
|
style.center = true;
|
||||||
break;
|
break;
|
||||||
|
case 'image':
|
||||||
|
image = {};
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -328,6 +396,9 @@ export default class BookParser {
|
|||||||
case 'center':
|
case 'center':
|
||||||
style.center = false;
|
style.center = false;
|
||||||
break;
|
break;
|
||||||
|
case 'image':
|
||||||
|
image = {};
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -335,7 +406,6 @@ export default class BookParser {
|
|||||||
onStartNode, onEndNode, onTextNode
|
onStartNode, onEndNode, onTextNode
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//длинные слова (или белиберду без пробелов) тоже разобьем
|
//длинные слова (или белиберду без пробелов) тоже разобьем
|
||||||
const maxWordLength = this.maxWordLength;
|
const maxWordLength = this.maxWordLength;
|
||||||
const parts = result;
|
const parts = result;
|
||||||
@@ -350,7 +420,7 @@ export default class BookParser {
|
|||||||
|
|
||||||
if (i - spaceIndex >= maxWordLength && i < p.text.length - 1 &&
|
if (i - spaceIndex >= maxWordLength && i < p.text.length - 1 &&
|
||||||
this.measureText(p.text.substr(spaceIndex + 1, i - spaceIndex), p.style) >= this.w - this.p) {
|
this.measureText(p.text.substr(spaceIndex + 1, i - spaceIndex), p.style) >= this.w - this.p) {
|
||||||
result.push({style: p.style, text: p.text.substr(0, i + 1)});
|
result.push({style: p.style, image: p.image, text: p.text.substr(0, i + 1)});
|
||||||
p = {style: p.style, text: p.text.substr(i + 1)};
|
p = {style: p.style, text: p.text.substr(i + 1)};
|
||||||
spaceIndex = -1;
|
spaceIndex = -1;
|
||||||
i = -1;
|
i = -1;
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 11080;
|
listen 80;
|
||||||
server_name omnireader.ru;
|
server_name old.omnireader.ru;
|
||||||
|
|
||||||
client_max_body_size 50m;
|
client_max_body_size 50m;
|
||||||
|
|
||||||
|
|||||||
26
package-lock.json
generated
26
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.2.0",
|
"version": "0.3.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -3095,6 +3095,30 @@
|
|||||||
"strip-dirs": "^2.0.0"
|
"strip-dirs": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"decompress-bzip2": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/decompress-bzip2/-/decompress-bzip2-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-0SVMlJ4F6vYol1QoawY/3Hz/AT8=",
|
||||||
|
"requires": {
|
||||||
|
"file-type": "^4.3.0",
|
||||||
|
"seek-bzip": "^1.0.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"file-type": {
|
||||||
|
"version": "4.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz",
|
||||||
|
"integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"decompress-gz": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/decompress-gz/-/decompress-gz-0.0.1.tgz",
|
||||||
|
"integrity": "sha512-YMdCWdxHvPplsTbV1tvr2oFJOtAFNxqVMFnKWEmePBXl+LKG5z5bFrowzc12Jzd7O29nnzI/D1M95Asx0Qa1fg==",
|
||||||
|
"requires": {
|
||||||
|
"file-type": "^5.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"decompress-response": {
|
"decompress-response": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.3.1",
|
"version": "0.3.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
@@ -60,6 +60,8 @@
|
|||||||
"chardet": "^0.7.0",
|
"chardet": "^0.7.0",
|
||||||
"compression": "^1.7.3",
|
"compression": "^1.7.3",
|
||||||
"decompress": "^4.2.0",
|
"decompress": "^4.2.0",
|
||||||
|
"decompress-bzip2": "^4.0.0",
|
||||||
|
"decompress-gz": "0.0.1",
|
||||||
"detect-file-type": "^0.2.0",
|
"detect-file-type": "^0.2.0",
|
||||||
"element-ui": "^2.4.11",
|
"element-ui": "^2.4.11",
|
||||||
"express": "^4.16.4",
|
"express": "^4.16.4",
|
||||||
|
|||||||
@@ -53,18 +53,16 @@ class BookConverter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
decode(data) {
|
decode(data) {
|
||||||
const charsetAll = chardet.detectAll(data.slice(0, 20000));
|
let selected = textUtils.getEncoding(data);
|
||||||
|
|
||||||
let selected = 'ISO-8859-5';
|
if (selected == 'ISO-8859-5') {
|
||||||
|
const charsetAll = chardet.detectAll(data.slice(0, 20000));
|
||||||
for (const charset of charsetAll) {
|
for (const charset of charsetAll) {
|
||||||
if (charset.name.indexOf('ISO-8859') < 0) {
|
if (charset.name.indexOf('ISO-8859') < 0) {
|
||||||
selected = charset.name;
|
selected = charset.name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected == 'ISO-8859-5') {
|
|
||||||
selected = textUtils.getEncoding(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return iconv.decode(data, selected);
|
return iconv.decode(data, selected);
|
||||||
|
|||||||
@@ -276,7 +276,84 @@ async function parse(xstr, options) {
|
|||||||
await _onProgress(100);
|
await _onProgress(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAttrsSync(tail) {
|
||||||
|
let result = {};
|
||||||
|
let name = '';
|
||||||
|
let value = '';
|
||||||
|
let vOpen = '';
|
||||||
|
let inName = false;
|
||||||
|
let inValue = false;
|
||||||
|
let waitValue = false;
|
||||||
|
let waitEq = false;
|
||||||
|
|
||||||
|
const pushResult = () => {
|
||||||
|
if (name != '') {
|
||||||
|
let ns = '';
|
||||||
|
if (name.indexOf(':') >= 0) {
|
||||||
|
[ns, name] = name.split(':');
|
||||||
|
}
|
||||||
|
|
||||||
|
result[name] = {value, ns};
|
||||||
|
}
|
||||||
|
name = '';
|
||||||
|
value = '';
|
||||||
|
vOpen = '';
|
||||||
|
inName = false;
|
||||||
|
inValue = false;
|
||||||
|
waitValue = false;
|
||||||
|
waitEq = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
tail = tail.replace(/[\t\n\r]/g, ' ');
|
||||||
|
for (let i = 0; i < tail.length; i++) {
|
||||||
|
const c = tail.charAt(i);
|
||||||
|
if (c == ' ') {
|
||||||
|
if (inValue) {
|
||||||
|
if (vOpen == '"')
|
||||||
|
value += c;
|
||||||
|
else
|
||||||
|
pushResult();
|
||||||
|
} else if (inName) {
|
||||||
|
waitEq = true;
|
||||||
|
inName = false;
|
||||||
|
}
|
||||||
|
} else if (!inValue && c == '=') {
|
||||||
|
waitEq = false;
|
||||||
|
waitValue = true;
|
||||||
|
inName = false;
|
||||||
|
} else if (c == '"') {
|
||||||
|
if (inValue) {
|
||||||
|
pushResult();
|
||||||
|
} else if (waitValue) {
|
||||||
|
inValue = true;
|
||||||
|
vOpen = '"';
|
||||||
|
}
|
||||||
|
} else if (inValue) {
|
||||||
|
value += c;
|
||||||
|
} else if (inName) {
|
||||||
|
name += c;
|
||||||
|
} else if (waitEq) {
|
||||||
|
pushResult();
|
||||||
|
inName = true;
|
||||||
|
name = c;
|
||||||
|
} else if (waitValue) {
|
||||||
|
waitValue = false;
|
||||||
|
inValue = true;
|
||||||
|
vOpen = ' ';
|
||||||
|
value = c;
|
||||||
|
} else {
|
||||||
|
inName = true;
|
||||||
|
name = c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (name != '')
|
||||||
|
pushResult();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parseSync,
|
parseSync,
|
||||||
|
getAttrsSync,
|
||||||
parse
|
parse
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ function checkIfText(buf) {
|
|||||||
const crFreq = crCount/(buf.length + 1);
|
const crFreq = crCount/(buf.length + 1);
|
||||||
const lfFreq = lfCount/(buf.length + 1);
|
const lfFreq = lfCount/(buf.length + 1);
|
||||||
|
|
||||||
return (spaceFreq > 0.1 || crFreq > 0.03 || lfFreq > 0.03);
|
return (buf.length < 1000 || spaceFreq > 0.1 || crFreq > 0.03 || lfFreq > 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const zlib = require('zlib');
|
const zlib = require('zlib');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
const path = require('path');
|
||||||
const utils = require('./utils');
|
const utils = require('./utils');
|
||||||
const decompress = require('decompress');
|
const decompress = require('decompress');
|
||||||
|
const decompressGz = require('decompress-gz');
|
||||||
|
const decompressBzip2 = require('decompress-bzip2');
|
||||||
|
|
||||||
const FileDetector = require('./FileDetector');
|
const FileDetector = require('./FileDetector');
|
||||||
|
|
||||||
class FileDecompressor {
|
class FileDecompressor {
|
||||||
@@ -13,10 +17,32 @@ class FileDecompressor {
|
|||||||
async decompressFile(filename, outputDir) {
|
async decompressFile(filename, outputDir) {
|
||||||
const fileType = await this.detector.detectFile(filename);
|
const fileType = await this.detector.detectFile(filename);
|
||||||
|
|
||||||
if (!fileType || !(fileType.ext == 'zip' || fileType.ext == 'bz2'))
|
if (!fileType || !(fileType.ext == 'zip' || fileType.ext == 'bz2' || fileType.ext == 'gz'))
|
||||||
return filename;
|
return filename;
|
||||||
|
|
||||||
const files = await decompress(filename, outputDir);
|
//дурной decompress, поэтому в 2 этапа
|
||||||
|
//этап 1
|
||||||
|
let files = [];
|
||||||
|
try {
|
||||||
|
files = await decompress(filename, outputDir);
|
||||||
|
} catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
//этап 2
|
||||||
|
if (files.length == 0) {
|
||||||
|
try {
|
||||||
|
files = await decompress(filename, outputDir, {
|
||||||
|
inputFile: filename,
|
||||||
|
plugins: [
|
||||||
|
decompressGz(),
|
||||||
|
decompressBzip2({path: path.basename(filename)}),
|
||||||
|
]
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let result = filename;
|
let result = filename;
|
||||||
let max = 0;
|
let max = 0;
|
||||||
@@ -29,6 +55,9 @@ class FileDecompressor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//дурной decompress
|
||||||
|
if (result != filename)
|
||||||
|
await fs.chmod(result, 0o664);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user