diff options
Diffstat (limited to 'saltoqd/cardmanager.cpp')
-rw-r--r-- | saltoqd/cardmanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/saltoqd/cardmanager.cpp b/saltoqd/cardmanager.cpp index 1bf8dd4..7465cc4 100644 --- a/saltoqd/cardmanager.cpp +++ b/saltoqd/cardmanager.cpp @@ -358,7 +358,11 @@ void CardManager::refreshDeck(CardDeck *deck) qDebug() << data; QString cardsFile = QString("/packages/%1/cards.dat").arg(deck->package()); - _fms->updateFile(cardsFile, data.toUtf8()); + if (!data.isEmpty()) { + _fms->updateFile(cardsFile, data.toUtf8()); + } else { + _fms->deleteFile(cardsFile); + } } void CardManager::handleToqConnected() |