mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
warn on can't read file, fixes #860
This commit is contained in:
parent
79dd992d81
commit
bc381a8459
|
@ -141,7 +141,10 @@ void ChatForm::onAttachClicked()
|
|||
{
|
||||
QFile file(path);
|
||||
if (!file.exists() || !file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QMessageBox::warning(this, tr("File not read"), tr("qTox wasn't able to open %1").arg(QFileInfo(path).fileName()));
|
||||
continue;
|
||||
}
|
||||
if (file.isSequential())
|
||||
{
|
||||
QMessageBox::critical(0, tr("Bad Idea"), tr("You're trying to send a special (sequential) file, that's not going to work!"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user