(save_cwd, restore_cwd): New functions.
authorJim Meyering <jim@meyering.net>
Tue, 21 Feb 1995 05:01:08 +0000 (05:01 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 21 Feb 1995 05:01:08 +0000 (05:01 +0000)
commit03daea30a66372d86e43c4aeae64d646258d3e9e
tree06096cd51eaf92347fb28f219395c84129184f0b
parent44416660ae2c5d1ba48813671f064d40f0fe2317
(save_cwd, restore_cwd): New functions.
(main): Use them instead of in-line versions.
(count_entry): Use them here instead of relying on chdir ("..") --
but only when necessary.  Before, with --dereference (-L),
traversing a symlink caused failure because chdir ("..") didn't
work as expected.  Reported by Bruno Haible.
src/du.c