File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,23 @@ impl Server {
304
304
path = & path[ 1 ..] ;
305
305
}
306
306
for p in path {
307
- path_buf. push ( p) ;
307
+ if cfg ! ( windows) {
308
+ let mut chars = p. chars ( ) ;
309
+ match ( chars. next ( ) , chars. next ( ) , chars. next ( ) ) {
310
+ ( Some ( drive_letter) , Some ( colon) , None )
311
+ if drive_letter. is_ascii_alphabetic ( )
312
+ && colon == ':' => {
313
+ let mut fixed_drive_prefix = String :: new ( ) ;
314
+ fixed_drive_prefix. push ( drive_letter) ;
315
+ fixed_drive_prefix. push ( colon) ;
316
+ fixed_drive_prefix. push ( '\\' ) ;
317
+ path_buf. push ( & fixed_drive_prefix) ;
318
+ } ,
319
+ _ => path_buf. push ( p) ,
320
+ }
321
+ } else {
322
+ path_buf. push ( p) ;
323
+ }
308
324
}
309
325
310
326
// FIXME should cache directory listings too
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export class RustwApp extends React.Component {
39
39
loadFileTreeData ( ) {
40
40
let self = this ;
41
41
utils . request (
42
- 'tree/' + CONFIG . workspace_root ,
42
+ 'tree/' + CONFIG . workspace_root . replace ( '\\' , '/' ) ,
43
43
function ( json ) {
44
44
if ( json . Directory ) {
45
45
self . setState ( { fileTreeData : json } )
You can’t perform that action at this time.
0 commit comments