Windows Folder Permissions
-
@d-healey yes, annoyingly it doesn't!
-
@DanH Very easy way to test it.
const dir = FileSystem.getFolder(FileSystem.Downloads); Console.print(dir.hasWriteAccess()); // If you get a 1 it works.
-
@d-healey looks like I've been here before
https://forum.hise.audio/topic/6404/downloading-permissions/5?_=1671616793197 -
@DanH Did you try the test script above? Are you sure you have write permission for the directory you're selecting?
-
@d-healey not yet I'm exporting right now. But I'm trying to save into a folder that I don't have permissions for in order to execute my error dialogue so the user know's what's going on.
-
@DanH said in Windows Folder Permissions:
@d-healey not yet I'm exporting right now. But I'm trying to save into a folder that I don't have permissions for in order to execute my error dialogue so the user know's what's going on.
make sure you are NOT running as an Admin then....as you will have a lot of permissions by default if you are.
-
@Lindon I've created a special folder with no permissions at all to test with. Doesn't matter if I'm admin or not. The point is that the script doesn't run the 'else' command after checking permissions.
I just rechecked the Admin Permissions box in the project settings again and now when I open my standalone app I get the generic windows User Account Control message which is interesting (Do you want to allow this app from an unknown publisher to make changes to your device?). It still doesn't solve the permissions script, however.
As my other thread details if you double click on the folder you are trying to save to (in the Windows save to dialogue) it will display a permissions error (made by @Christoph-Hart I assume). However I assume like me most people will click once on the folder and then click 'Select Folder' button (in the Windows browser I mean).
Would be great if this permissions error would show after hitting the 'Select Folder' button as well.
-
@DanH Yep I can confirm this issue. But it's not a HISE issue, it's a JUCE issue, and an old one - https://forum.juce.com/t/file-haswriteaccess-does-not-check-permissions/31340
-
@d-healey but it does work if you double click on the folder...
-
@DanH Yes, but that's unrelated to JUCE.
-
@d-healey you think that's a Windows message?
-
@DanH Show me a screenshot please so I know we're talking about the same thing.
-
@d-healey how does one screenshot windows?
-
@DanH Press the Prnt Scrn button on your keyboard or use the Snipping Tool.
-
@d-healey had to take a photo in the end
-
@DanH Yeah that's a Window's message from Explorer.
-
@d-healey ok, thanks!
-
@d-healey so I've ended up using a timer to check the download progress and if it stays on 0 for more than 10 seconds the app then displays an error message and advises the user to check permissions. Should be ok for now unless you can think of something better?!
-
@DanH Seems like a good idea to include that anyway, even if the permissions thing was working.
unless you can think of something better?!
Nag the JUCE developers to fix it :)