Skip to content

Commit

Permalink
path is a fucking trap
Browse files Browse the repository at this point in the history
cause some thumbnail not found
  • Loading branch information
hjyssg committed Apr 17, 2020
1 parent 039f6a6 commit 1256027
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ function setUpFileWatch(){
});

cacheWatcher
.on('unlinkDir', path => {
const p = path.dirname(path);
db.cacheTable[p] = undefined;
.on('unlinkDir', p => {
const fp = path.dirname(p);
db.cacheTable[fp] = undefined;
});

function getCacheFp(p){
Expand Down Expand Up @@ -651,12 +651,12 @@ async function getFirstImageFromZip(fileName, res, mode, counter) {
}

// Overwrite mode
//-aos Skip extracting of existing files.
const opt = ['x', fileName, `-o${outputPath}`, one, "-aos"];
const {stdout2, stderr2} = await execa(sevenZip, opt);
if (!stderr2) {
// send path to client
const subtokens = one.split(path.sep);
let temp = path.join(cache_folder_name, path.basename(outputPath), subtokens[subtokens.length-1]);
let temp = path.join(outputPath, one);
temp = cleanFileName(temp);
sendImage(temp);

Expand Down

0 comments on commit 1256027

Please sign in to comment.