Skip to content

Commit 6c498af

Browse files
committed
fix #695 mark isfs root bad if unreachable
1 parent a165d58 commit 6c498af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/providers/FileSystemProvider/FileSystemProvider.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
4646
const parent = await this._lookupAsDirectory(uri);
4747
const api = new AtelierAPI(uri);
4848
if (!api.active) {
49-
return;
49+
throw vscode.FileSystemError.Unavailable(`${uri.toString()} is unavailable`);
5050
}
5151
const sql = `CALL %Library.RoutineMgr_StudioOpenDialog(?,?,?,?,?,?,?)`;
5252
const { query } = url.parse(uri.toString(true), true);
@@ -293,6 +293,12 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
293293

294294
// Fetch entry (a file or directory) from cache, else from server
295295
private async _lookup(uri: vscode.Uri): Promise<Entry> {
296+
if (uri.path === "/") {
297+
const api = new AtelierAPI(uri);
298+
if (!api.active) {
299+
throw vscode.FileSystemError.Unavailable(`${uri.toString()} is unavailable`);
300+
}
301+
}
296302
const parts = uri.path.split("/");
297303
let entry: Entry = this.root;
298304
for (let i = 0; i < parts.length; i++) {

0 commit comments

Comments
 (0)