mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
fix rename_to() on windows
This commit is contained in:
parent
95a6051462
commit
5f0b8a9a6a
@ -2430,6 +2430,15 @@ rename_to(const Filename &other) const {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try unlinking the target first.
|
||||||
|
other.unlink();
|
||||||
|
if (rename(temp_os_specific.c_str(),
|
||||||
|
other_os_specific.c_str()) == 0) {
|
||||||
|
// Successfully renamed.
|
||||||
|
unlink();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Failed.
|
// Failed.
|
||||||
temp.unlink();
|
temp.unlink();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user