Looking at the lclintf.OpenDocument function on Unix:
  if (APath<>'') and (APath[1]<>'"') then
    APath:=QuotedStr(APath);

Am I being dense again or is this an error in the code?
The first character of APath is checked for " (double quote).
if it isn't, the path is enclosed in single quotes.

So a path that already is included in single quotes e.g.
'/var/lib/some unlikely location/bla.txt'
turns into
'''/var/lib/some unlikely location/bla.txt'''
(if I understand
http://www.freepascal.org/docs-html/rtl/sysutils/quotedstr.html
correctly).

Is this intended behaviour or should the code read like this:
  if (APath<>'') and (APath[1]<>'''') then
    APath:=QuotedStr(APath);


Thanks,
Reinier

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to