From 73bd401db18316a4e25af62abb4114469731bc11 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Wed, 18 Apr 2012 15:55:13 +0300 Subject: [PATCH] Ticket #2777: Stale symlinks in vfs How to reproduce: * mkdir -p a/b/c * touch a/b/c/d * ln -s d a/b/c/e * tar -cf bad.tar a * rm -rf a * cd bad.tar/utar://a/b/c Expected result: 'e' should be valid symlink to 'd' Actual result: 'e' looks like broken link Signed-off-by: Slava Zanko --- lib/vfs/direntry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index 01c107bf4..ad7c729f7 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -1149,7 +1149,7 @@ vfs_s_fullpath (struct vfs_class *me, struct vfs_s_inode *ino) if (!ino->ent) ERRNOR (EAGAIN, NULL); - if ((MEDATA->flags & VFS_S_USETMP) != 0) + if ((MEDATA->flags & VFS_S_USETMP) == 0) { /* archives */ char *newpath; -- 2.11.4.GIT