mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-30 14:55:43 -04:00
Qt/MemoryCardEditor: Prevent duplicate filenames when copying saves
This commit is contained in:
parent
47e2cd382b
commit
f112222fae
@ -331,6 +331,19 @@ void MemoryCardEditorDialog::doCopyFile()
|
|||||||
|
|
||||||
Card* dst = (src == &m_card_a) ? &m_card_b : &m_card_a;
|
Card* dst = (src == &m_card_a) ? &m_card_b : &m_card_a;
|
||||||
|
|
||||||
|
for (const MemoryCardImage::FileInfo& dst_fi : dst->files)
|
||||||
|
{
|
||||||
|
if (dst_fi.filename == fi->filename)
|
||||||
|
{
|
||||||
|
QMessageBox::critical(
|
||||||
|
this, tr("Error"),
|
||||||
|
tr("Destination memory card already contains a save file with the same name (%1) as the one you are attempting "
|
||||||
|
"to copy. Please delete this file from the destination memory card before copying.")
|
||||||
|
.arg(QString(fi->filename.c_str())));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dst->blocks_free < fi->num_blocks)
|
if (dst->blocks_free < fi->num_blocks)
|
||||||
{
|
{
|
||||||
QMessageBox::critical(this, tr("Error"),
|
QMessageBox::critical(this, tr("Error"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user