"Move to recycle bin" for Windows is now ready for the tests.
This commit is contained in:
parent
f9efb48450
commit
2a6b55e3c2
2 changed files with 3 additions and 6 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue