Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoided overwriting of files #1716

Merged
merged 8 commits into from
May 17, 2024
Merged

Conversation

TwoOfTwelve
Copy link
Contributor

@TwoOfTwelve TwoOfTwelve commented Apr 18, 2024

Avoids overwriting of existing results files. Tries to find a new unique filename by adding (). Aborts if the selected file is not writable. Also adds a cli option --overwrite, that ignores existing files. This still aborts if the file cannot be written.

Solved #1670

@tsaglam
Copy link
Member

tsaglam commented Apr 18, 2024

@TwoOfTwelve could you add a small test for this?

cli/src/main/java/de/jplag/cli/CLI.java Outdated Show resolved Hide resolved
cli/src/main/java/de/jplag/cli/options/CliOptions.java Outdated Show resolved Hide resolved
@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change labels Apr 23, 2024
@TwoOfTwelve TwoOfTwelve requested a review from Kr0nox May 2, 2024 08:44
Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

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

One minor thing plus the 5 small sonar issues left todo.

cli/src/main/java/de/jplag/cli/CLI.java Outdated Show resolved Hide resolved
@tsaglam tsaglam linked an issue May 3, 2024 that may be closed by this pull request
Copy link

sonarcloud bot commented May 16, 2024

@TwoOfTwelve TwoOfTwelve requested a review from tsaglam May 16, 2024 11:37
@tsaglam tsaglam merged commit ae64101 into develop May 17, 2024
44 checks passed
@tsaglam tsaglam deleted the feature/checkIfResultFileCanBeWritten branch May 17, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid overriding result files
3 participants