Application.persistentDataPath - File Copy Violation

Hey,

So Im having this issue on Mac only, Windows behaves fine.

Im using File.Copy to copy files to the app data path. There are instances were I would be copying a file with the same file name copied previously, but not the same file, so I have overwrite enabled on File.Copy.

Whenever I try and copy the second time I get the Access Is Denied Error.

UnauthorizedAccessException: Access to the path "/Users/harleytorissi/Downloads/concrete01_diff.jpg" or "/Users/harleytorissi/Library/Application Support/Asset Cat/Asset Cat/1a8630ef-1ebc-421d-a2b4-91f710b010fb/Temp/06a3001a-f812-423f-9748-1b8c9724746a/concrete01_diff.jpg" is denied.

For this example they are texture files. I have tried disposing of the WWW object after using but it still won’t let me overwrite.

Any ideas would be helpful :slight_smile:

*UPDATE

It seams to only be with .jpg’s

*Resolved

Seams there was a read only permission set on the file, so overwrite would fail. It was a downloaded texture and I was not aware haha