BUG REPORT : renaming files

CodeLite installation/troubleshooting forum
rallysjd
CodeLite Curious
Posts: 5
Joined: Sat Dec 14, 2013 10:59 pm
Genuine User: Yes
IDE Question: C++
Contact:

BUG REPORT : renaming files

Post by rallysjd »

Running 5.3 on Win7-32, I note the following sequences that seems rather odd.

I have two files in the project, a .C and a .H (note the upper case). For reasons of code and naming consistency, I want to change these to .c and .h (lowercase).

1. The rename file dialog won't permit me to change the extensions because the file already exists. This seem to me to be a bug.

2. Removing (rather than just excluding) the two files from the project but not deleting them, saving the project, and restarting Codelite results in the .C and .H file still being present in the project. This is not what I would expect to happen: surely if a file is removed from a project, should it not stay removed until replaced?

3. If in Windows Explorer I rename the files to .c and .h, when CodeLite restarts, the files still show up as .C and .H. This is not what I expected, but is not really a bug, just a Windows thing.

4. If I move the .C and .H (or .c and .h) to another directory, when CodeLite restarts, the files still show up in the project. Would not it be helpful if there was a message that informs me that a file is missing? Trying to open them does not generate any message either.

5. Removing and Deleting the .C and .H file project entries (even though the files now don't exist in the project paths) is required. Moving the now .c and .h back to the project path and importing them results in the listing as .c and .h, which is what I wanted.

Have I missed something in how CodeLite works, as this does all seem rather clumsy.

regards,
SD
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: BUG REPORT : renaming files

Post by eranif »

This is probably because on Windows, .C and .c are the same file, so the call to ::wxRenameFile failed
On Linux, the .C would have been removed and .c would have been added to the project (as one would expect)
rallysjd wrote: If I move the .C and .H (or .c and .h) to another directory, when CodeLite restarts, the files still show up in the project.
codelite does not automatically analyze the project file content and removes stale files. You can however, do that manually - Using the Reconcile Project feature

For the rest, well there is a bug already opened for it: https://sourceforge.net/p/codelite/bugs/860/

Eran
Make sure you have read the HOW TO POST thread
Post Reply