919
// Check if source is equal or parent to target (requires providers to be the same)
920
if (sourceProvider === targetProvider) {
921
>
const { providerExtUri, isPathCaseSensitive } = this.getExtUri(sourceProvider);
fileService.ts
922
>
if (!isPathCaseSensitive) {
923
isSameResourceWithDifferentPathCase = providerExtUri.isEqual(source, target);
924
}
926
>
if (isSameResourceWithDifferentPathCase && mode === 'copy') {
927
throw new Error(localize('unableToMoveCopyError1', "Unable to copy when source '{0}' is same as target '{1}' with different path case on a case insensitive file system", this.resourceForError(source), this.resourceForError(target)));
928
}
930
>
if (!isSameResourceWithDifferentPathCase && providerExtUri.isEqualOrParent(target, source)) {
931
throw new Error(localize('unableToMoveCopyError2', "Unable to move/copy when source '{0}' is parent of target '{1}'.", this.resourceForError(source), this.resourceForError(target)));
932
}
934
935
// Extra checks if target exists and this is not a rename