Added a comment

This commit is contained in:
Pierre Pronchery 2007-07-29 16:06:39 +00:00
parent e223e0d50e
commit 2ba9d0e69a

View File

@ -95,7 +95,7 @@ static int _mv_single(Prefs * prefs, char const * src, char const * dst)
int ret; int ret;
struct stat st; struct stat st;
if(lstat(src, &st) != 0 && errno == ENOENT) if(lstat(src, &st) != 0 && errno == ENOENT) /* XXX TOCTOU */
return _mv_error(src, 1); return _mv_error(src, 1);
if(*prefs & PREFS_i if(*prefs & PREFS_i
&& (lstat(dst, &st) == 0 || errno != ENOENT) && (lstat(dst, &st) == 0 || errno != ENOENT)