[Libreoffice-bugs] [Bug 125607] URL to folder / directory no longer working in LO 6.2.4.2 for Mac

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jun 13 21:35:32 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=125607

--- Comment #7 from Thomas Maeder <thms.maeder at gmail.com> ---
(In reply to Stephan Bergmann from comment #6)

I cannot judge on how LO works on other platforms, but MS Excel (which I still
have to use at the office...) behaves in a similar way on both Mac and Windows:
while it does not let you select a folder in all implementations, links to
folders have (up to now) always worked as expected on both platforms.
As for the security issue, it seems it is possible to detect applications. Two
examples using Applescript (simple folder vs application) to get their info are
given below. Looking at both resulting attribute sets:
- Both applications and folders indeed  have the "folder" attribute (your
concern).
- Applications names have the ".app" ending, folders don't.
- The file type of apps is "APPL", that of folders is an empty string "".
- Applications (+ others) are bundles (the "package folder" attribute), not
folders.
Other attributes may be used, such as "kind", but, as seen in the example, the
returned value is localised (in French in this example), making it harder to
write generic code.
A safe way to differentiate seems to me to check for the "APPL" attribute. One
could also possibly ban opening bundles. What do you think?

------
1) Folder: Desktop

1a) Script
set elem to "Desktop" as alias
get info for elem

1b) Result
{name:"Desktop", creation date:date "lundi, 10 décembre 2007 à 22:05:00",
modification date:date "jeudi, 16 décembre 2010 à 15:22:36", size:6148,
folder:true, alias:false, package folder:false, visible:true, extension
hidden:false, name extension:missing value, displayed name:"Bureau", default
application:alias "Hobbes:System:Library:CoreServices:Finder.app:",
kind:"Dossier", folder window:{0, 0, 0, 0}, file type:"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190613/396f2a9b/attachment.html>


More information about the Libreoffice-bugs mailing list