From c1bd18c9efd5a793ca170421e349710d3d5538a5 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 23 May 2010 09:21:58 +0000 Subject: [PATCH] LCL: OpenDocument: auto add quotes, bug #16541 git-svn-id: trunk@25586 - --- lcl/lclintf.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lcl/lclintf.pas b/lcl/lclintf.pas index 2da4729233..3148e86d89 100644 --- a/lcl/lclintf.pas +++ b/lcl/lclintf.pas @@ -318,6 +318,7 @@ var lApp: string; begin Result := True; + if not FileExistsUTF8(APath) then exit(false); lApp:=FindFilenameOfCmd('xdg-open'); // Portland OSDL/FreeDesktop standard on Linux if lApp='' then @@ -327,6 +328,8 @@ begin if lApp='' then Exit(False); + if (APath<>'') and (APath[1]<>'"') then + APath:=QuotedStr(APath); RunCmdFromPath(lApp,APath); end; {$ENDIF}