@@ -8,7 +8,7 @@ import URI from 'vs/base/common/uri';
88import { FileService } from 'vs/workbench/services/files/electron-browser/fileService' ;
99import { IContent , IStreamContent , IFileStat , IResolveContentOptions , IUpdateContentOptions , IResolveFileOptions , IResolveFileResult , FileOperationEvent , FileOperation , IFileSystemProvider , IStat , FileType , IImportResult , FileChangesEvent , ICreateFileOptions , FileOperationError , FileOperationResult , ITextSnapshot , snapshotToString } from 'vs/platform/files/common/files' ;
1010import { TPromise } from 'vs/base/common/winjs.base' ;
11- import { basename , join } from 'path' ;
11+ import { posix } from 'path' ;
1212import { IDisposable } from 'vs/base/common/lifecycle' ;
1313import { isFalsyOrEmpty , distinct } from 'vs/base/common/arrays' ;
1414import { Schemas } from 'vs/base/common/network' ;
@@ -33,7 +33,7 @@ function toIFileStat(provider: IFileSystemProvider, tuple: [URI, IStat], recurse
3333 isDirectory : false ,
3434 isSymbolicLink : stat . type === FileType . Symlink ,
3535 resource : resource ,
36- name : basename ( resource . path ) ,
36+ name : posix . basename ( resource . path ) ,
3737 mtime : stat . mtime ,
3838 size : stat . size ,
3939 etag : stat . mtime . toString ( 29 ) + stat . size . toString ( 31 ) ,
@@ -421,7 +421,7 @@ export class RemoteFileService extends FileService {
421421 if ( resource . scheme === Schemas . file ) {
422422 return super . rename ( resource , newName ) ;
423423 } else {
424- const target = resource . with ( { path : join ( resource . path , '..' , newName ) } ) ;
424+ const target = resource . with ( { path : posix . join ( resource . path , '..' , newName ) } ) ;
425425 return this . _doMoveWithInScheme ( resource , target , false ) ;
426426 }
427427 }
@@ -467,7 +467,7 @@ export class RemoteFileService extends FileService {
467467 if ( source . scheme === targetFolder . scheme && source . scheme === Schemas . file ) {
468468 return super . importFile ( source , targetFolder ) ;
469469 } else {
470- const target = targetFolder . with ( { path : join ( targetFolder . path , basename ( source . path ) ) } ) ;
470+ const target = targetFolder . with ( { path : posix . join ( targetFolder . path , posix . basename ( source . path ) ) } ) ;
471471 return this . copyFile ( source , target , false ) . then ( stat => ( { stat, isNew : false } ) ) ;
472472 }
473473 }
0 commit comments