display.save() to system.CachesDirectory doesn't work

If you try do use display.save() to system.CachesDirectory, the file will be saved in system.DocumentsDirectory instead. [import]uid: 70847 topic_id: 34661 reply_id: 334661[/import]

I’ve confirmed that [lua]display.save()[/lua] can save to the caches directory. However, this function will save to the documents directory by default if the 2nd argument is misspelled.

Are you sure you don’t have a typo?
If you do, then that effectively passes nil as a 2nd argument.
[import]uid: 32256 topic_id: 34661 reply_id: 137750[/import]

Strange…
This is a paste directly from my code, which doesn’t work.

display.save(activeMonster, "monster.jpg", system.CachesDirectory);

The file gets saved to the Documents directory. If I change to system.TemporaryDirectory it get saved to the tmp directory…
The problem happens both in the Corona Simulator, and on a device (iPad mini).

I’m running on an iMac with OSX 10.8.2, Corona 2013.999 [import]uid: 70847 topic_id: 34661 reply_id: 137844[/import]

I’m sorry. You’re absolutely right. I dug a little deeper and have found that [lua]display.save()[/lua] can only write to the Documents and Temporary directory. If you give it any other directory then it defaults to the Documents directory.

I’ll look into changing it this week.
Thanks for bringing this issue up. [import]uid: 32256 topic_id: 34661 reply_id: 137938[/import]

I’ve confirmed that [lua]display.save()[/lua] can save to the caches directory. However, this function will save to the documents directory by default if the 2nd argument is misspelled.

Are you sure you don’t have a typo?
If you do, then that effectively passes nil as a 2nd argument.
[import]uid: 32256 topic_id: 34661 reply_id: 137750[/import]

Strange…
This is a paste directly from my code, which doesn’t work.

display.save(activeMonster, "monster.jpg", system.CachesDirectory);

The file gets saved to the Documents directory. If I change to system.TemporaryDirectory it get saved to the tmp directory…
The problem happens both in the Corona Simulator, and on a device (iPad mini).

I’m running on an iMac with OSX 10.8.2, Corona 2013.999 [import]uid: 70847 topic_id: 34661 reply_id: 137844[/import]

I’m sorry. You’re absolutely right. I dug a little deeper and have found that [lua]display.save()[/lua] can only write to the Documents and Temporary directory. If you give it any other directory then it defaults to the Documents directory.

I’ll look into changing it this week.
Thanks for bringing this issue up. [import]uid: 32256 topic_id: 34661 reply_id: 137938[/import]

This issue has been fixed as of daily build #1007, which is available today.
Thank you for reporting this issue. [import]uid: 32256 topic_id: 34661 reply_id: 139496[/import]

This issue has been fixed as of daily build #1007, which is available today.
Thank you for reporting this issue. [import]uid: 32256 topic_id: 34661 reply_id: 139496[/import]