Do not allow non-absolute paths when saving textures. Closes #1795

This commit is contained in:
baldurk committed 2020-03-30 21:47:24 +01:00
1 parent 4f72e09b62
commit e6a9632d81
1 file changed
+9
@@ -662,6 +662,15 @@ void TextureSaveDialog::on_saveCancelButtons_accepted()
QFileInfo fi(filename());
if(!fi.isAbsolute())
{
RDDialog::critical(
this, tr("Save Texture"),
tr("%1\nIs not an absolute path.\nCheck the path and try again.").arg(filename()));
return;
}
QDir dir = fi.dir();
bool valid = dir.makeAbsolute();