#43 Compiled file overwrites source file

closed-fixed
None
5
2007-02-01
2007-01-22
Anonymous
No

I found this problem writing simple pascal programs:

When saved source code gets a filename without extension the source file has the the same name as the compiled file.
After compiling the source file is gone, but you can work on without problems - before next compile the source file overwrites the compiled file, then the compiled file overwrites the source file again, etc.

But when geany is closed, the source code isn't stored in memory anymore. Next time when it's opend you see the beginning of the compiled binary file.

One (easy) solution could be forcing a language specific extension to sourcefiles then there can't be files without extensions.

Another (better) solution could be testing wheter the source file has no extension and using a different name for the compiled file.

Sorry if I used bad English.

Discussion

  • Enrico Tröger
    Enrico Tröger
    2007-02-01

    • assigned_to: nobody --> eht16
    • status: open --> closed-fixed
     
  • Enrico Tröger
    Enrico Tröger
    2007-02-01

    Logged In: YES
    user_id=1117045
    Originator: NO

    Thanks for reporting. It should be fixed in SVN r1239. I choosed the easy solution because I think it's not a very common case to use source files(except shell/perl scripts) without a filename extension. If one is doing so, Geany now prints a warning and stop the command(compiling/building/executing).