@@ -25,6 +25,7 @@ import {
25
25
handleError ,
26
26
isClassDeployed ,
27
27
isClassOrRtn ,
28
+ lastUsedLocalUri ,
28
29
notIsfs ,
29
30
notNull ,
30
31
outputChannel ,
@@ -649,7 +650,7 @@ export async function importLocalFilesToServerSideFolder(wsFolderUri: vscode.Uri
649
650
}
650
651
const api = new AtelierAPI ( wsFolderUri ) ;
651
652
// Get the default URI and remove the file anme
652
- let defaultUri = vscode . workspace . workspaceFile ;
653
+ let defaultUri = lastUsedLocalUri ( ) ?? vscode . workspace . workspaceFile ;
653
654
defaultUri = defaultUri . with ( { path : defaultUri . path . split ( "/" ) . slice ( 0 , - 1 ) . join ( "/" ) } ) ;
654
655
// Prompt the user for files to import
655
656
let uris = await vscode . window . showOpenDialog ( {
@@ -674,6 +675,7 @@ export async function importLocalFilesToServerSideFolder(wsFolderUri: vscode.Uri
674
675
vscode . window . showErrorMessage ( "No classes or routines were selected." , "Dismiss" ) ;
675
676
return ;
676
677
}
678
+ lastUsedLocalUri ( uris [ 0 ] ) ;
677
679
// Get the name and content of the files to import
678
680
const textDecoder = new TextDecoder ( ) ;
679
681
const docs = await Promise . allSettled < { name : string ; content : string ; uri : vscode . Uri } > (
@@ -777,7 +779,7 @@ export async function importXMLFiles(): Promise<any> {
777
779
if ( defaultUri . scheme == FILESYSTEM_SCHEMA ) {
778
780
// Need a default URI without the isfs scheme or the open dialog
779
781
// will show the server-side files instead of local ones
780
- defaultUri = vscode . workspace . workspaceFile ;
782
+ defaultUri = lastUsedLocalUri ( ) ?? vscode . workspace . workspaceFile ;
781
783
if ( defaultUri . scheme != "file" ) {
782
784
vscode . window . showErrorMessage (
783
785
"'Import XML Files...' command is not supported for unsaved workspaces." ,
@@ -809,6 +811,7 @@ export async function importXMLFiles(): Promise<any> {
809
811
vscode . window . showErrorMessage ( "No XML files were selected." , "Dismiss" ) ;
810
812
return ;
811
813
}
814
+ lastUsedLocalUri ( uris [ 0 ] ) ;
812
815
// Read the XML files
813
816
const fileTimestamps : Map < string , string > = new Map ( ) ;
814
817
const filesToList = await Promise . allSettled (
0 commit comments