[studio] Make file move do nothing if the file already exists
This commit is contained in:
parent
12f6b22c8b
commit
e132f2fd1b
@ -495,11 +495,15 @@ ox::Error StudioUI::queueFileMove(ox::StringParam src, ox::StringParam dst) noex
|
|||||||
|
|
||||||
void StudioUI::procFileMoves() noexcept {
|
void StudioUI::procFileMoves() noexcept {
|
||||||
for (auto const &m : m_queuedMoves) {
|
for (auto const &m : m_queuedMoves) {
|
||||||
oxLogError(m_project->moveItem(m.a, m.b));
|
if (!m_project->exists(m.b)) {
|
||||||
|
oxLogError(m_project->moveItem(m.a, m.b));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_queuedMoves.clear();
|
m_queuedMoves.clear();
|
||||||
for (auto const &m : m_queuedDirMoves) {
|
for (auto const &m : m_queuedDirMoves) {
|
||||||
oxLogError(m_project->moveDir(m.a, m.b));
|
if (!m_project->exists(m.b)) {
|
||||||
|
oxLogError(m_project->moveDir(m.a, m.b));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_queuedDirMoves.clear();
|
m_queuedDirMoves.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user