From cd84a3024d2d3a40dc11fb4f9206ab62fa66753d Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Mon, 26 Aug 2013 11:28:07 +0100 Subject: [PATCH] Now an attempt to export into a folder without write permission causes LyX to automatically pop-up the "Export As" dialog (addressing #3402). --- src/frontends/qt4/GuiView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 993e830036..ffc7073937 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3304,6 +3304,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) dispatch(FuncRequest(LFUN_DIALOG_SHOW, "sendto"), dr); break; } + if (!doc_buffer->fileName().onlyPath().isDirWritable()) { + exportBufferAs(*doc_buffer); + break; + } /* TODO/Review: Is it a problem to also export the children? See the update_unincluded flag */ d.asyncBufferProcessing(argument, -- 2.39.2