Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/providers/FileSystemProvider/FileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ export function generateFileContent(
eol,
};
}
} else if (csp && sourceContent.length == 0) {
// 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.
return {
content: [""],
enc: false,
eol,
};
}
return {
content: base64EncodeContent(Buffer.from(sourceContent)),
Expand Down Expand Up @@ -606,15 +613,15 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
// Create content (typically a stub, unless the write-phase of a copy operation).
const newContent = generateFileContent(uri, fileName, content);

// Write it to the server
// Write it to the server, ignoring conflict report that some IRIS versions incorrectly give
return api
.putDoc(
fileName,
{
...newContent,
mtime: Date.now(),
},
false
true
)
.catch((error) => {
// Throw all failures
Expand Down
Loading