Use pathExists instead of exists

This commit is contained in:
Robert
2023-06-16 12:21:36 +01:00
parent fce27d02dc
commit ce6a21c65a

View File

@@ -9,7 +9,7 @@ import {
import { MultiFileSystemWatcher } from "./multi-file-system-watcher";
import { AppEventEmitter } from "../events";
import { extLogger } from "..";
import { exists, lstat } from "fs-extra";
import { lstat, pathExists } from "fs-extra";
import { containsPath } from "../../pure/files";
import { getOnDiskWorkspaceFoldersObjects } from "./workspace-folders";
@@ -140,7 +140,7 @@ export abstract class FilePathDiscovery<T extends PathData> extends Discovery {
}
private async handledChangedPath(path: string): Promise<boolean> {
if (!(await exists(path)) || !this.pathIsInWorkspace(path)) {
if (!(await pathExists(path)) || !this.pathIsInWorkspace(path)) {
return this.handleRemovedPath(path);
}
if ((await lstat(path)).isDirectory()) {