Skip to content

Conversation

@egalvis27
Copy link

What is Changed / Added


Added the following extensions: ['.swp', '.swo', '.swn', '.swm']

Why

In Linux, different text editors create temporary files with varying extensions, and not all of these extensions were being handled properly.

return this.right(0);
} catch (err) {
if (path.includes('.goutputstream-')) {
if (TemporalFile.isTemporaryPath(path)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one type of temporary file extension was being validated, which is problematic because different editors generate temporary files with varying extensions.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
31.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

try {
const path = new TemporalFilePath(pathString);
const file = new TemporalFile(new Date(), path, new TemporalFileSize(0), new Date());
return file.isAuxiliary();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are cases where we need to validate a temporary file that is in transit—meaning it doesn't yet exist physically, but we still need to identify it. This static function was created to perform validation without requiring the file's metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants