提交 c61c23b4 编写于 作者: J Jared Moore

Open File Handler now untildifies. Fixes #32736

上级 fafcb48f
...@@ -106,6 +106,14 @@ export function tildify(path: string, userHome: string): string { ...@@ -106,6 +106,14 @@ export function tildify(path: string, userHome: string): string {
return path; return path;
} }
export function untildify(path: string, userHome: string): string {
if (platform.isMacintosh || platform.isLinux) {
path = path.replace(/^~($|\/|\\)/, `${userHome}$1`);
}
return path;
}
/** /**
* Shortens the paths but keeps them easy to distinguish. * Shortens the paths but keeps them easy to distinguish.
* Replaces not important parts with ellipsis. * Replaces not important parts with ellipsis.
......
...@@ -142,6 +142,9 @@ export class OpenFileHandler extends QuickOpenHandler { ...@@ -142,6 +142,9 @@ export class OpenFileHandler extends QuickOpenHandler {
return TPromise.as(new FileQuickOpenModel([])); return TPromise.as(new FileQuickOpenModel([]));
} }
// Untildify file pattern
searchValue = labels.untildify(searchValue, this.environmentService.userHome);
// Do find results // Do find results
return this.doFindResults(searchValue, this.cacheState.cacheKey, maxSortedResults); return this.doFindResults(searchValue, this.cacheState.cacheKey, maxSortedResults);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册