1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00

Improved File::moveFileTo and made file renaming in the introjucer more robust.

This commit is contained in:
jules 2012-05-02 16:37:00 +01:00
parent 7e9fbd30c3
commit 75ad35f786
2 changed files with 5 additions and 1 deletions

View file

@ -542,7 +542,8 @@ bool Project::Item::renameFile (const File& newFile)
{
const File oldFile (getFile());
if (oldFile.moveFileTo (newFile))
if (oldFile.moveFileTo (newFile)
|| (newFile.exists() && ! oldFile.exists()))
{
setFile (newFile);
OpenDocumentManager::getInstance()->fileHasBeenRenamed (oldFile, newFile);