eslint: add no-shadow
This commit is contained in:
+4
-4
@@ -106,8 +106,8 @@ async function getFilesystems() {
|
||||
];
|
||||
|
||||
for (const stdPath of standardPaths) {
|
||||
const [dfError, diskInfo] = await safe(df.file(stdPath.path));
|
||||
if (dfError) throw new BoxError(BoxError.FS_ERROR, `Error getting std path: ${dfError.message}`);
|
||||
const [dfPathError, diskInfo] = await safe(df.file(stdPath.path));
|
||||
if (dfPathError) throw new BoxError(BoxError.FS_ERROR, `Error getting std path: ${dfPathError.message}`);
|
||||
filesystems[diskInfo.filesystem].contents.push(stdPath);
|
||||
}
|
||||
|
||||
@@ -240,9 +240,9 @@ class FilesystemUsageTask extends AsyncTask {
|
||||
if (!dockerDf) dockerDf = await docker.df({ abortSignal });
|
||||
content.usage = content.id === 'docker' ? dockerDf.LayersSize : dockerDf.Volumes.map((v) => v.UsageData.Size).reduce((a,b) => a + b, 0);
|
||||
} else {
|
||||
const [error, usage] = await safe(du(content.path, { abortSignal }));
|
||||
const [error, duResult] = await safe(du(content.path, { abortSignal }));
|
||||
if (error) debug(`du error ${content.path}: ${error.message}`); // can happen if app is installing etc
|
||||
content.usage = usage || 0;
|
||||
content.usage = duResult || 0;
|
||||
}
|
||||
usage += content.usage;
|
||||
this.emitData({ content });
|
||||
|
||||
Reference in New Issue
Block a user