mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Migrate old logs
This commit is contained in:
parent
75bb6e5211
commit
ffac96d0a0
1 changed files with 11 additions and 0 deletions
|
@ -228,6 +228,17 @@ function deleteOldFiles(directoryPath, maxAgeInSeconds, filenameRegex) {
|
|||
var oldLogPath = path.join(getApplicationDataDirectory(), '/logs');
|
||||
var logPath = path.join(getApplicationDataDirectory(true), '/logs');
|
||||
|
||||
if (oldLogPath != logPath) {
|
||||
console.log("Migrating old logs from " + oldLogPath + " to " + logPath);
|
||||
fs.copy(oldLogPath, logPath, err => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
console.log('success!');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
log.debug("Log directory:", logPath);
|
||||
log.debug("Data directory:", getRootHifiDataDirectory());
|
||||
|
||||
|
|
Loading…
Reference in a new issue