mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
fixed volume feature in case of absolute paths (#308)
This commit is contained in:
@@ -172,8 +172,9 @@ if (fs.existsSync(vector.configFile)) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
config.volume = config.volume || global.EXTERNAL_VOLUME_DIRECTORY || "./";
|
config.volume = config.volume || global.EXTERNAL_VOLUME_DIRECTORY || "";
|
||||||
|
|
||||||
|
if (config.volume && config.volume.length) {
|
||||||
if (config.volume.slice(-1) !== "/") {
|
if (config.volume.slice(-1) !== "/") {
|
||||||
config.volume += "/";
|
config.volume += "/";
|
||||||
}
|
}
|
||||||
@@ -181,6 +182,7 @@ if (config.volume.slice(-1) !== "/") {
|
|||||||
if (!fs.existsSync(config.volume)) {
|
if (!fs.existsSync(config.volume)) {
|
||||||
fs.mkdirSync(config.volume);
|
fs.mkdirSync(config.volume);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const errorTransport = new FileLogger({
|
const errorTransport = new FileLogger({
|
||||||
logRotatePattern: config.logging.logRotatePattern,
|
logRotatePattern: config.logging.logRotatePattern,
|
||||||
|
|||||||
Reference in New Issue
Block a user