rename icon indicating copy to clipboard operation
rename copied to clipboard

Renamed the wrong app? The one I wasn't in the directory of when I ran rename_to?

Open CharlesWarsh opened this issue 9 years ago • 1 comments

Yesterday I cloned a git repo into my local repo folder. I used rename gem to rename it. Lets call the repo I pulled down generic-app and say that I renamed it to app-1. Worked great, thanks for making this program.

However, this morning having to work on a different project that called for starting from that same generic-app, I again cloned a copy of generic-app to my code folder. So now in my code directory I have app-1 from yesterday and generic-app that I just cloned. I navigate my terminal into the generic-app directory and run the rails g rename:app_to app-2 command to change the name to app-2 so that I will have app-1 and app-2 in my code directory.

But thats not what happened. Rather than renaming the app of the directory my terminal was currently navigated to (generic-app), it renamed the one that had already been renamed yesterday (app-1). So now in my code directory I have app-2 and generic-app, app-1 from yesterday is gone. I happened to have the app-1 project open in my text editor at the time so I was able to see that all the pages were edited and that this was a case of the wrong app being renamed rather than anything else.

Any idea how to prevent this in the future?

CharlesWarsh avatar Sep 23 '15 15:09 CharlesWarsh

Thank you Charles for using the library and letting me know about the issue with good explanation. I was on vacation that's why it has been late to reply you back.

It was a fun to write the gem and didn't get time to work on this after build. I think it might happen for "-" but not sure. I'll look into this soon and let you the update.

morshedalam avatar Sep 27 '15 10:09 morshedalam

@CharlesWarsh It's been a long I couldn't look into it, sorry for that. Today, I went through your instruction but couldn't replicate. Not sure but might be related to the lib version you used at that time.

Closing the issue, re-open or re-create if you ever experience similar issue.

And, thank you for using the library.

morshedalam avatar May 14 '24 08:05 morshedalam