macOS has become so very odd. I’m getting an IOException when downloading a new app version with Kaju.
The download file is created:
DownloadFile = SpecialFolder.UserHome
if DownloadFile <> nil and DownloadFile.Exists then DownloadFile = DownloadFile.Child("Downloads")
if DownloadFile <> nil and DownloadFile.Exists then DownloadFile = DownloadFile.Child(SelectedBinary.FileName)
if DownloadFile = nil then Return
And then the file is downloaded:
dim path as string = file.NativePath.DefineEncoding( Encodings.UTF8 )
dim f as new Xojo.IO.FolderItem( path.ToText )
super.Send "GET", url.ToText, f
The second line makes the IOException:
2021-05-30 11:22:08 Type of Error: Xojo.IO.IOException
2021-05-30 11:22:08 Error Number: 0
2021-05-30 11:22:08 Error Message: This file could not be opened
I can’t really say why the folderitem needs to be defined as utf8. The only part of the file that might be problematic is the filename.
Is this a case again of “macOS has lost access to folder xyz”? For now I’ve asked the user to restart the computer.
Does anyone have an idea what might going on here?