diff -urN fakechroot-0.2.6.1+1.1.5.orig/libfakeroot.c fakechroot-0.2.6.1+1.1.5/libfakeroot.c --- fakechroot-0.2.6.1+1.1.5.orig/libfakeroot.c 2004-11-24 13:20:30 +0300 +++ fakechroot-0.2.6.1+1.1.5/libfakeroot.c 2005-08-31 15:56:52 +0400 @@ -1319,7 +1320,7 @@ send_stat(&st,chmod_func); ptr = tmp; strcpy(ptr, template); - narrow_chroot_path(ptr, -1, EEXIST); + narrow_chroot_path(ptr, fd, errno); strcpy(oldtemplate, ptr); return fd; }