You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am reluctant to add checks like that, certain awareness is required from users when working with command line tools.
Few notes if such check should be added:
this affects and would be added to all bcftools commands
realpath() would have to be used to prevent common variations (eg ./file.bcf vs file.bcf) or symlinks
this would still not catch hard links
this would still not catch cases where multiple commands are piped together
probably best is to check for the existence of output file. However, this breaks backward compatibility and will not be liked by those who want to overwrite existing files without being asked
So although seemingly simple, it's not an easy decision to make.
It sounds like it should be possible to modify file in-place:
However, if
-o
path is same as input file path, the result is a corrupted file. Why not an error message or work as expected?The text was updated successfully, but these errors were encountered: