private verifyUri()

in src/AzureStorageFS.ts [465:491]


    private verifyUri(uri: vscode.Uri, rootName?: string): vscode.Uri {
        // Remove slashes from rootName for consistency
        rootName = (rootName || this.getRootName(uri)).replace(/\//g, '');

        const cache = this._queryCache.get(rootName);
        if (cache) {
            if (uri.query) {
                this._queryCache.set(rootName, { query: cache.query, invalid: cache.invalid || cache.query !== uri.query });
            } else {
                if (cache.invalid) {
                    throw new Error('Cannot auto-detect resource path. For this functionality, re-load VS Code and only open one resource per workspace.');
                }

                // Fallback to the cached query because this uri's query doesn't exist
                return vscode.Uri.parse(`azurestorage://${uri.path}?${cache.query}`);
            }
        } else {
            if (uri.query) {
                // No cache for this rootName yet so cache the query
                this._queryCache.set(rootName, { query: uri.query });
            } else {
                throw new Error('No URI query cache available.');
            }
        }

        return uri;
    }