@lvce-editor/output-view 2.21.1 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2105,10 +2105,13 @@ const getLogsDir = async () => {
|
|
|
2105
2105
|
};
|
|
2106
2106
|
|
|
2107
2107
|
const legacyWindowLogFileName = 'log-window.txt';
|
|
2108
|
+
const isWindowLogFileName = name => {
|
|
2109
|
+
return /^\d+\.txt$/.test(name) || /^\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.\d{3}Z\.txt$/.test(name);
|
|
2110
|
+
};
|
|
2108
2111
|
const getLatestLogFileName = dirents => {
|
|
2109
2112
|
let latest = '';
|
|
2110
2113
|
for (const dirent of dirents) {
|
|
2111
|
-
if (dirent.type === 1 &&
|
|
2114
|
+
if (dirent.type === 1 && isWindowLogFileName(dirent.name) && dirent.name > latest) {
|
|
2112
2115
|
latest = dirent.name;
|
|
2113
2116
|
}
|
|
2114
2117
|
}
|