Downloading / Permissions
-
-
I've created a download app to download and install my samples. On OSX if I try and download to a folder which doesn't have the correct permissions (i.e Read only) is there any way to get a permissions dialogue to show up so the user can grant permission? Otherwise the app just sits on 0% progress.
-
On Windows, what's the best way of re-creating the issue above? i.e Create a folder, give it read only permissions
-
-
-
If the folder is read only then I don't think a permission dialog will help, unless the sudo user has write access, in which case I think you need to run the app as sudo.
-
I think you can change the folder permissions on Windows by right-clicking the folder and selecting the option that shows the folder's properties window (can't remember what it's called).
There is a
File.hasWriteAccess()
function you might find useful.Also you probably want to enable this if you haven't already.
-
-
@d-healey aha, yes this looks perfect thanks!
-
@DanH hmmmm... Using File.hasWriteAccess() works great in OSX but not so on Windows.
I enabled Admin Permissions too but that hasn't made any difference.
The code goes through the File.hasWriteAccess() check as it obviously looks ok to Hise, and then the download sits at 0%.
In the folder I'm trying to download to I simply went to properties, Security and then removed Write permissions for Authenticated Users.
Is File.hasWriteAccess() meant to work in Windows @Christoph-Hart
-
@DanH small update - when in the browse window browsing for the location to save into, double clicking on the folder brings up the windows permissions dialogue. Clicking on it once and then clicking ‘ok’ doesn’t.