macOS: move deleted file to Trash
As opposed to permanently deleting it. As requested: https://sourceforge.net/p/tuxpaint/feature-requests/148/
This commit is contained in:
parent
d289d407ad
commit
ed885f887d
5 changed files with 30 additions and 7 deletions
|
|
@ -20,6 +20,7 @@
|
|||
(See COPYING.txt)
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -86,3 +87,9 @@ const char *apple_picturesPath(void)
|
|||
{
|
||||
return IOS_PICTURES_PATH;
|
||||
}
|
||||
|
||||
|
||||
int apple_trash(const char *path)
|
||||
{
|
||||
return unlink(path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue