-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Plugin version: 2.0.7
OS: Android 9 (Real device, and emulator)
Description
When there are many log files, the log files are not automatically removed.
The following error is written to the log file
SEVERE ERROR: could not clean up old files. [object Object]
This is because removeFile() always fails
Expected behaviour
Old log files are deleted as expected.
Detail
Upon investigating the code, I suspect the filePath used is invalid.
private removeFile(entry: Entry): Promise<any> {
this.debug_metaLog('Removing file: ' + entry.fullPath);
const fullPath = entry.fullPath;
const path = fullPath.replace(entry.name, ''); // THIS IS THE PROBLEM
return this.file.removeFile(this.config.baseDir + path, entry.name);
}
I believe the fix should be to use the log directory
const path = this.config.logDir;
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working