File tree Expand file tree Collapse file tree
src/providers/FileSystemProvider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,6 +155,13 @@ export function generateFileContent(
155155 eol,
156156 } ;
157157 }
158+ } else if ( csp && sourceContent . length == 0 ) {
159+ // Some IRIS versions do not allow empty content to be PUT for CSP files, so add a newline if the content is empty. See DP-442552.
160+ return {
161+ content : [ "" ] ,
162+ enc : false ,
163+ eol,
164+ } ;
158165 }
159166 return {
160167 content : base64EncodeContent ( Buffer . from ( sourceContent ) ) ,
@@ -606,15 +613,15 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
606613 // Create content (typically a stub, unless the write-phase of a copy operation).
607614 const newContent = generateFileContent ( uri , fileName , content ) ;
608615
609- // Write it to the server
616+ // Write it to the server, ignoring conflict report that some IRIS versions incorrectly give
610617 return api
611618 . putDoc (
612619 fileName ,
613620 {
614621 ...newContent ,
615622 mtime : Date . now ( ) ,
616623 } ,
617- false
624+ true
618625 )
619626 . catch ( ( error ) => {
620627 // Throw all failures
You can’t perform that action at this time.
0 commit comments