@@ -24,7 +24,7 @@ export class AtelierAPI {
2424 return workspaceState . get ( this . workspaceFolder + ":iris" , false ) ;
2525 }
2626
27- private formatCspName ( filename : string ) : string {
27+ private transformNameIfCsp ( filename : string ) : string {
2828 // If a CSP file, change from
2929 // \csp\user\... to
3030 // csp/user/...
@@ -278,7 +278,7 @@ export class AtelierAPI {
278278 format,
279279 } ;
280280 }
281- name = this . formatCspName ( name ) ;
281+ name = this . transformNameIfCsp ( name ) ;
282282 return this . request ( 1 , "GET" , `${ this . ns } /doc/${ name } ` , params ) ;
283283 }
284284 // api v1+
@@ -288,7 +288,7 @@ export class AtelierAPI {
288288 // v1+
289289 public putDoc ( name : string , data : { enc : boolean ; content : string [ ] } , ignoreConflict ?: boolean ) : Promise < any > {
290290 const params = { ignoreConflict } ;
291- name = this . formatCspName ( name ) ;
291+ name = this . transformNameIfCsp ( name ) ;
292292 return this . request ( 1 , "PUT" , `${ this . ns } /doc/${ name } ` , data , params ) ;
293293 }
294294 // v1+
@@ -330,7 +330,7 @@ export class AtelierAPI {
330330 }
331331 // v1+
332332 public actionCompile ( docs : string [ ] , flags ?: string , source = false ) : Promise < any > {
333- docs = docs . map ( ( doc ) => this . formatCspName ( doc ) ) ;
333+ docs = docs . map ( ( doc ) => this . transformNameIfCsp ( doc ) ) ;
334334 return this . request ( 1 , "POST" , `${ this . ns } /action/compile` , docs , {
335335 flags,
336336 source,
0 commit comments