Skip to content

Commit 736985d

Browse files
author
Tyler Smalley
authored
File Explorer: Fix issue with spaces in filenames (#277)
We were escaping spaces while using that value directly in SFTP calls. This caused the escape character (`\`) to be included in the file/directory name. Additionally, if a space was included it would not be able to be deleted as it would issue the delete call to include the escape character. Closes #231 Signed-off-by: Tyler Smalley <[email protected]>
1 parent de645ae commit 736985d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Diff for: src/filesystem-provider-ssh.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { exec } from 'child_process';
33
import { Logger } from './logger';
44
import { SSH } from './ssh';
55
import { ConfigManager } from './config-manager';
6-
import { escapeSpace } from './utils/string';
76
import { parseTsUri } from './utils/uri';
87
import { fileSorter } from './filesystem-provider';
98

Diff for: src/utils/uri.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Uri } from 'vscode';
2-
import { escapeSpace } from './string';
32

43
export interface TsUri {
54
address: string;
@@ -34,7 +33,7 @@ export function parseTsUri(uri: Uri): TsUri {
3433
let resourcePath = decodeURIComponent(pathSegments.join('/'));
3534

3635
if (!resourcePath.startsWith('.')) {
37-
resourcePath = `/${escapeSpace(resourcePath)}`;
36+
resourcePath = `/${resourcePath}`;
3837
}
3938

4039
return { address, tailnet: uri.authority, resourcePath };

0 commit comments

Comments
 (0)