dst, not src in second realpath

SVN revision: 17409
This commit is contained in:
sebastid 2005-10-10 21:10:04 +00:00 committed by sebastid
parent 4545433592
commit da7d6dbe30
1 changed files with 8 additions and 6 deletions

View File

@ -129,12 +129,14 @@ ecore_file_cp(const char *src, const char *dst)
char realpath2[PATH_MAX];
size_t num;
if (realpath(src, realpath1) && realpath(src,realpath2))
if (!strcmp(realpath1, realpath2))
return 0;
else
return 0;
if (realpath(src, realpath1) && realpath(dst, realpath2))
{
if (!strcmp(realpath1, realpath2))
return 0;
}
else
return 0;
f1 = fopen(src, "rb");
if (!f1) return 0;
f2 = fopen(dst, "wb");