diff --git a/find/find.c b/find/find.c                                                                                                                                                                                                       
index d0c2d1f..bcf2ba3 100644                                                                                                                                                                                                                
--- a/find/find.c                                                                                                                                                                                                                            
+++ b/find/find.c                                                                                                                                                                                                                            
@@ -1091,7 +1091,7 @@ safely_chdir_nofollow(const char *dest,                                                                                                                                                                                
                      struct stat *statbuf_dest,                                                                                                                                                                                             
                      enum ChdirSymlinkHandling symlink_handling)                                                                                                                                                                            
 {                                                                                                                                                                                                                                           
-  int extraflags = following_links() ? O_NOFOLLOW : 0;                                                                                                                                                                                      
+  int extraflags = following_links() ? 0 : O_NOFOLLOW;                                                                                                                                                                                      
                                                                                                                                                                                                                                             
   errno = 0;                                                                                                                                                                                                                                
   int fd = open(dest, O_RDONLY|extraflags);
