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

re2torea: need an check to detect input filename = output filename #795

Open
yslan opened this issue Feb 13, 2023 · 0 comments
Open

re2torea: need an check to detect input filename = output filename #795

yslan opened this issue Feb 13, 2023 · 0 comments

Comments

@yslan
Copy link
Contributor

yslan commented Feb 13, 2023

If we accidentally use the same name for the input and output, it will overwrite the rea file and corrupt the file. The tool also run to the end without error message.

A simple check would be nice.

To reproduce:

$ ls 
t.re2  t.rea

$ re2torea
Input old .rea and .re2 (source) file name:
t
 Input new .rea (output) file name:
t
 byte swap: F   6.54321003      -2.93127722E+35
         192           3         192
 number of curved sides           0
           1         224 number of bc

The reatore2 has the same issue but it will at least give a runtime error like this

Fortran runtime error: End of file
@yslan yslan changed the title re2torea: need an error to detect input filename = output filename re2torea: need an check to detect input filename = output filename Feb 13, 2023
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

No branches or pull requests

1 participant