My app searches files and folders. It creates a list of folders to search in an array, but after upgrading to the latest Mac OSX on one computer, it created an alias folder called “Relocated items.nosync” in the Desktop folder. If that folder is there, it makes the search crash. If I take it out, it runs fine. I tried to exclude aliases with this, but it still crashes.
if subFolderSearch.value = true then
if f.directory then
if f.alias = false and f <> nil then
subFolderArrayZ.append f.absolutePath
end if
end if
end if
Yes, I read it already. Here is what the text file inside says:
During the last macOS upgrade or file migration, some of your files couldn’t be moved to their new locations. This folder contains these files.
There is a Configuration folder within that folder also and it points to Users>Shared>Relocated Items>Configuration>Private>etc then there is a “group.system_default” file inside there.
I’d just like to know how to either prevent folder from being added to the array or to actually search it successfully. I believe it’s crashing at the point of being added to the array, but I’ll need to test a bit more to be sure.
I re-compiled my app in the latest version of XOJO and had to change absolutePath to nativePath in all cases and for some reason that seems to have fixed the issue. I was using an older version of XOJO previously.
API 2.0 might be a dirty word, but the newer folderitem constructor allows for alias to be resolved while passing in a nativePath, or for my needs to NOT be resolved, which is nice IMHO.
There is a bug when using URLpaths, where it will always resolve an alias at urlPath regardless <https://xojo.com/issue/63416>