diff --git a/src/svnContentProvider.ts b/src/svnContentProvider.ts index db0c0a6a..f88325aa 100644 --- a/src/svnContentProvider.ts +++ b/src/svnContentProvider.ts @@ -87,20 +87,20 @@ export class SvnContentProvider } async provideTextDocumentContent(uri: Uri): Promise { - const repository = this.model.getRepository(uri.fsPath); + try { + const { fsPath, action, extra } = fromSvnUri(uri); - if (!repository) { - return ""; - } + const repository = this.model.getRepository(fsPath); - const cacheKey = uri.toString(); - const timestamp = new Date().getTime(); - const cacheValue: CacheRow = { uri, timestamp }; + if (!repository) { + return ""; + } - this.cache[cacheKey] = cacheValue; + const cacheKey = uri.toString(); + const timestamp = new Date().getTime(); + const cacheValue: CacheRow = { uri, timestamp }; - try { - const { fsPath, action, extra } = fromSvnUri(uri); + this.cache[cacheKey] = cacheValue; if (action === SvnUriAction.SHOW) { const ref = extra.ref;