Use uriFromFilePath instead of vscode.Uri.from at VsCodeIde.getStats (#918)
This commit is contained in:
parent
f2b76d8595
commit
96b31a7468
1 changed files with 5 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ import { ContinueRcJson, IDE, IdeInfo, Problem, Range } from "core";
|
|||
import { DiffManager } from "./diff/horizontal";
|
||||
import { VsCodeIdeUtils } from "./util/ideUtils";
|
||||
import { traverseDirectory } from "./util/traverseDirectory";
|
||||
import { getExtensionUri, openEditorAndRevealRange } from "./util/vscode";
|
||||
import { getExtensionUri, openEditorAndRevealRange, uriFromFilePath } from "./util/vscode";
|
||||
|
||||
class VsCodeIde implements IDE {
|
||||
ideUtils: VsCodeIdeUtils;
|
||||
|
|
@ -40,10 +40,13 @@ class VsCodeIde implements IDE {
|
|||
const pathToLastModified: { [path: string]: number } = {};
|
||||
await Promise.all(
|
||||
files.map(async (file) => {
|
||||
const uri = vscode.Uri.from({
|
||||
let uri = vscode.Uri.from({
|
||||
scheme: scheme ? scheme : "file",
|
||||
path: file,
|
||||
});
|
||||
if (scheme?.includes("vscode-remote")) {
|
||||
uri = uriFromFilePath(file);
|
||||
}
|
||||
let stat = await vscode.workspace.fs.stat(uri);
|
||||
pathToLastModified[file] = stat.mtime;
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue