X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvclone.c;h=a4eeda1bdc1f86b78d62546d6082e158dd5eec1d;hb=HEAD;hp=c180bcfd97542499f4218b83005381a32e7ef429;hpb=cb254ada9242e23f138ee4b231fb98f6bb8a7126;p=util-vserver.git diff --git a/src/vclone.c b/src/vclone.c index c180bcf..a4eeda1 100644 --- a/src/vclone.c +++ b/src/vclone.c @@ -125,6 +125,7 @@ handleDirEntry(const PathInfo *src_path, const PathInfo *basename, else { PathInfo dst_path = global_info.dst; char dst_path_buf[ENSC_PI_APPSZ(dst_path, *src_path)]; + struct stat dst_st; if (S_ISDIR(st->st_mode)) *is_dir = true; @@ -135,13 +136,13 @@ handleDirEntry(const PathInfo *src_path, const PathInfo *basename, Vwrite(1, src_path->d, src_path->l); WRITE_MSG(1, "' (excluded)\n"); } - return false; + return true; } PathInfo_append(&dst_path, src_path, dst_path_buf); /* skip files that already exist */ - if (access(dst_path.d, F_OK)!=-1) { + if (lstat(dst_path.d, &dst_st)!=-1) { if (Global_getVerbosity() > 1) { WRITE_MSG(1, " skipping '"); Vwrite(1, src_path->d, src_path->l);