careful with path comparisons on windows

related to #50760
This commit is contained in:
Joao Moreno
2018-05-30 09:21:46 +02:00
parent d49246788f
commit 98601ceb2c
3 changed files with 14 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ import { workspace, Uri, Disposable, Event, EventEmitter, window } from 'vscode'
import { debounce, throttle } from './decorators';
import { fromGitUri, toGitUri } from './uri';
import { Model, ModelChangeEvent, OriginalResourceChangeEvent } from './model';
import { filterEvent, eventToPromise, isDescendant } from './util';
import { filterEvent, eventToPromise, isDescendant, pathEquals } from './util';
interface CacheRow {
uri: Uri;
@@ -130,7 +130,7 @@ export class GitContentProvider {
const { path } = fromGitUri(row.uri);
const isOpen = workspace.textDocuments
.filter(d => d.uri.scheme === 'file')
.some(d => d.uri.fsPath === path);
.some(d => pathEquals(d.uri.fsPath, path));
if (isOpen || now - row.timestamp < THREE_MINUTES) {
cache[row.uri.toString()] = row;