44import { Button } from "@/app/element/button" ;
55import { Input } from "@/app/element/input" ;
66import { ContextMenuModel } from "@/app/store/contextmenu" ;
7- import { PLATFORM , atoms , createBlock , getApi } from "@/app/store/global" ;
7+ import { PLATFORM , atoms , createBlock , getApi , globalStore } from "@/app/store/global" ;
88import { RpcApi } from "@/app/store/wshclientapi" ;
99import { TabRpcClient } from "@/app/store/wshrpcutil" ;
1010import type { PreviewModel } from "@/app/view/preview/preview" ;
@@ -296,8 +296,8 @@ function DirectoryTable({
296296 console . log ( `replacing ${ fileName } with ${ newName } : ${ path } ` ) ;
297297 fireAndForget ( async ( ) => {
298298 await RpcApi . FileMoveCommand ( TabRpcClient , {
299- srcuri : await model . formatRemoteUri ( path ) ,
300- desturi : await model . formatRemoteUri ( newPath ) ,
299+ srcuri : await model . formatRemoteUri ( path , globalStore . get ) ,
300+ desturi : await model . formatRemoteUri ( newPath , globalStore . get ) ,
301301 opts : {
302302 recursive : true ,
303303 } ,
@@ -610,7 +610,7 @@ function TableBody({
610610 meta : {
611611 controller : "shell" ,
612612 view : "term" ,
613- "cmd:cwd" : await model . formatRemoteUri ( finfo . path ) ,
613+ "cmd:cwd" : await model . formatRemoteUri ( finfo . path , globalStore . get ) ,
614614 } ,
615615 } ;
616616 await createBlock ( termBlockDef ) ;
@@ -627,7 +627,7 @@ function TableBody({
627627 fireAndForget ( async ( ) => {
628628 await RpcApi . FileDeleteCommand ( TabRpcClient , {
629629 info : {
630- path : await model . formatRemoteUri ( finfo . path ) ,
630+ path : await model . formatRemoteUri ( finfo . path , globalStore . get ) ,
631631 } ,
632632 } ) . catch ( ( e ) => console . log ( e ) ) ;
633633 setRefreshVersion ( ( current ) => current + 1 ) ;
@@ -726,7 +726,7 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
726726 TabRpcClient ,
727727 {
728728 info : {
729- path : await model . formatRemoteUri ( dirPath ) ,
729+ path : await model . formatRemoteUri ( dirPath , globalStore . get ) ,
730730 } ,
731731 } ,
732732 null
@@ -825,7 +825,7 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
825825 TabRpcClient ,
826826 {
827827 info : {
828- path : await model . formatRemoteUri ( `${ dirPath } /${ newName } ` ) ,
828+ path : await model . formatRemoteUri ( `${ dirPath } /${ newName } ` , globalStore . get ) ,
829829 } ,
830830 } ,
831831 null
@@ -844,7 +844,7 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
844844 fireAndForget ( async ( ) => {
845845 await RpcApi . FileMkdirCommand ( TabRpcClient , {
846846 info : {
847- path : await model . formatRemoteUri ( `${ dirPath } /${ newName } ` ) ,
847+ path : await model . formatRemoteUri ( `${ dirPath } /${ newName } ` , globalStore . get ) ,
848848 } ,
849849 } ) ;
850850 model . refreshCallback ( ) ;
0 commit comments