Closed fossfreedom closed 5 years ago
@fossfreedom, the problem is that the file has execution permissions (you are sharing a windows folder probably), so, the application try to "execute" it (instead to open it). Any idea how to discover it is not an executable? You can see the code here
Think the correct way is to use the ContentType functions rather than explicitly check the file execute permissions or maybe use it in conjunction
https://valadoc.org/gio-2.0/GLib.ContentType.html
i.e. public boolhttps://valadoc.org/glib-2.0/bool.html can_be_executablehttps://valadoc.org/gio-2.0/GLib.ContentType.can_be_executable.html (stringhttps://valadoc.org/glib-2.0/string.html type) --> check if the type is something that normally is executable ... I'm guessing PDF's are not executable. Not sure if the function itself tests if the execute permission is given on the file - so may have to say something like
if "can_be_executable(...) && file.is_executable()" then "run the file"
On Wed, 9 Jan 2019 at 14:54, José Amuedo Salmerón notifications@github.com<mailto:notifications@github.com> wrote:
@fossfreedomhttps://github.com/fossfreedom, the problem is that the file has execution permissions (you are sharing a windows folder probably), so, the application try to "execute" it (instead to open it). Any idea how to discover it is not an executable? You can see the code herehttps://github.com/spheras/desktopfolder/blob/80e5090e2db5517a9d03c90d27e5cd0d9512a1ab/src/logic/ItemManager.vala#L289
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/spheras/desktopfolder/issues/240#issuecomment-452724443, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA8zkLiYHbVqc1ZcBo1URpqOvp8kqvP5ks5vBgK4gaJpZM4Z3Vef.
I tried to solve the problem following your hint (thanks!). Pls, check and tell me if it is ok now.
Excellent. Really works very nice now and quite intuitive. Well done :)
On Mon, 14 Jan 2019 at 10:22, José Amuedo Salmerón notifications@github.com<mailto:notifications@github.com> wrote:
I tried to solve the problem following your hint (thanks!). Pls, check and tell me if it is ok now.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/spheras/desktopfolder/issues/240#issuecomment-453957352, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA8zkPk5kED0k8NvtiNVd22B_DOKw6vfks5vDFpYgaJpZM4Z3Vef.
On my virtual UB I created a linked panel to my windows Downloads shared folder
All icons are ok. Double clicking a file e.g. pdf though fails ... see the picture terminal to see what the errors reported are.
Using git master and UB 18.04.1