I have a machine running Windows 10. IsWriteable for a folder item pointing to the users own Documents folder is returning False. Any location I select returns False. I know it’s writable because I can create a file there via Windows Explorer.
Any ideas what may be causing this? The same snippet of code works fine on many other machines, Windows and Mac. Just one user is having this problem.
Windows sometimes does things to block writes. With Xojo IDE, I could save as a binary file but not as the regular (text) format. Windows just would not let Xojo write the applicaiton out. Now if I started the Xojo app on another machine, copies it over via git and just “edited” the code, then Xojo could write out. “something” on the windows machine (either O/S, or antivirus or something) was blocking the writes that “created” the files. drove me mad.
now I never start an app on windows (even it if a windows only app), I start it on my Mac, save it in the regular text format, commit it to git, copy it to the windows machine via git then go from there.
good luck on tracking down what is giving you the false positives or weirdness you are seeing.
//Check if db path is writable
Dim f As New FolderItem(Preferences.dbPath, FolderItem.PathTypeNative)
Dim intMsgResponse As Integer
If f.IsWriteable = False Then
intMsgResponse = MsgBox("The location (" + Preferences.dbPath + ") is not writable. Would you like to choose a different path?", 20)
If intMsgResponse = 6 Then
app.selectLibraryLocation()
End If
Return
End If
Preferences.dbPath on this machine is a string: “C:\Users\Public”
This has worked on hundreds of machines, this is the first time I’ve seen this false positive.
hate it with a passion. but the day job says I work on a windows laptop… (long story on that, we can chat about it over a beer sometime). Mac’s are 10x more developer friendly in my opinion.
So do Macs. I had a situation last year where the Remote Debugger could not write the tar file into the folder I wanted. All the permissions were any group could read , write or execute in the folder. Even with help from a couple of Xojo engineers we could not get to the bottom of the problem. Another folder worked fine, so I moved on.