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:
parent
7e9fbd30c3
commit
75ad35f786
2 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue