are you schewpic
Former-commit-id: 5858160470aae5fbb85510a991f708d2ab1e7341
This commit is contained in:
@@ -20,9 +20,9 @@ function Get(req, res) {
|
|||||||
// I HAVE NO IDEA HOW TO DO THIS WITHOUT A LOT OF WORK
|
// I HAVE NO IDEA HOW TO DO THIS WITHOUT A LOT OF WORK
|
||||||
|
|
||||||
// if linux
|
// if linux
|
||||||
const defaultFile = `${process.cwd()}\\db\\img\\default.png`;
|
let defaultFile = `${process.cwd()}\\db\\img\\default.png`;
|
||||||
if (process.platform !== 'win32') {
|
if (process.platform !== 'win32') {
|
||||||
defaultFile.replace(/\\/g, '/');
|
defaultFile = defaultFile.replace(/\\/g, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
// this very randomly fails sometimes
|
// this very randomly fails sometimes
|
||||||
@@ -32,9 +32,9 @@ function Get(req, res) {
|
|||||||
const bucket = hash.substring(0, 4);
|
const bucket = hash.substring(0, 4);
|
||||||
|
|
||||||
// if linux
|
// if linux
|
||||||
const file = `${process.cwd()}\\db\\img\\${bucket[0]}\\${bucket[1]}\\${bucket[2]}\\${bucket[3]}\\${id}`;
|
let file = `${process.cwd()}\\db\\img\\${bucket[0]}\\${bucket[1]}\\${bucket[2]}\\${bucket[3]}\\${id}`;
|
||||||
if (process.platform !== 'win32') {
|
if (process.platform !== 'win32') {
|
||||||
file.replace(/\\/g, '/');
|
file = file.replace(/\\/g, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs.existsSync(file)) {
|
if (fs.existsSync(file)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user