File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/vs/workbench/services/textfile/browser Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import { coalesce } from 'vs/base/common/arrays';
35
35
import { suggestFilename } from 'vs/base/common/mime' ;
36
36
import { INotificationService } from 'vs/platform/notification/common/notification' ;
37
37
import { toErrorMessage } from 'vs/base/common/errorMessage' ;
38
+ import { resolve } from 'vs/base/common/path' ;
38
39
39
40
/**
40
41
* The workbench file service implementation implements the raw file service spec and adds additional methods on top.
@@ -587,7 +588,10 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
587
588
}
588
589
589
590
// Finally fallback to suggest just the file name
590
- return toLocalResource ( resource . with ( { path : suggestedFilename } ) , remoteAuthority ) ;
591
+ // Since we do not have a default file path to
592
+ // put, we use path.resolve() to make sure the path
593
+ // is absolute.
594
+ return toLocalResource ( resource . with ( { path : resolve ( suggestedFilename ) } ) , remoteAuthority ) ;
591
595
}
592
596
593
597
//#endregion
You can’t perform that action at this time.
0 commit comments