diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 6659cae26..9ccc51f75 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -358,9 +358,9 @@ static void mtw(wchar_t * wtok, char *tok, size_t size) iconv_close(trans); } -//#define USE_WINDOWS_RECYCLE_BIN +#define USE_WINDOWS_RECYCLE_BIN #ifdef USE_WINDOWS_RECYCLE_BIN -extern int win32_trash(char *path); +extern int win32_trash(const char *path); #endif #endif /* WIN32 */ diff --git a/src/win32_trash.c b/src/win32_trash.c index ca5cb9262..c089e8c6d 100644 --- a/src/win32_trash.c +++ b/src/win32_trash.c @@ -24,14 +24,11 @@ int MoveFileToRecycleBin(const TCHAR *fullPathName) int win32_trash(const char *path) { char *p, *src; - int ret; src = p = strdup(path); while(*p != '\0'){ if (*p == '/') *p = '\\'; p++; } - ret = MoveFileToRecycleBin(src); - free(p); - return ret; + return MoveFileToRecycleBin(src); }