Commit graph

12 commits

Author SHA1 Message Date
Yorhel
ef4abec6cf path.c: Don't throw away remaining components after a symlink
This is a quick hack to fix http://dev.yorhel.nl/ncdu/bug/18.
path_real() is both rather unreadable, fragile, hard to maintain and a
bit inefficient. It wouldn't be too surprising if I introduced a new bug
with this commit...

*makes a note to do a proper rewrite of that code later on*
2012-08-29 22:06:43 +02:00
Yorhel
e380805990 Fixed some compiler warnings and a (rather nonexistent) memory leak
This silences clang and gcc with -O2 -Wall -Wextra
2012-08-26 18:12:13 +02:00
Yorhel
7fcae11d4d Copyright year bump
Damn, it's 2012 already.
2012-01-18 11:40:50 +01:00
Yorhel
5243e2daf4 Code cleanup: Use `static' where applicable.
This should also allow compilers to generate better code.
2011-10-31 15:09:49 +01:00
Yorhel
00bd015d79 Belated copyright year bump 2011-10-31 14:47:15 +01:00
Yorhel
9f7bc01f11 Fixed segfault when launched on a nonexistant directory
Forgot to check the return value of path_absolute() in path_real(),
path_absolute() would return an error when getcwd() fails.

Fixes bug #3012787.
2010-07-19 12:45:33 +02:00
Yorhel
82ec5b9fa8 Misc. minor fixes 2010-02-28 10:13:12 +01:00
Yorhel
101731ed13 Copyright year bump 2010-02-27 15:20:57 +01:00
Yorhel
21f2e62793 Removed another occurence of dirfd()
This fixes a tiny memory leak as well, as the return value of opendir()
wasn't passed to a closedir() after use.
2009-06-06 21:04:47 +02:00
Yorhel
a0bf6deebb Removed reliance on dirfd() 2009-05-16 10:20:58 +02:00
Yorhel
2738177fff Fixed memory overflow bug in path_real_rec() 2009-04-25 14:26:52 +02:00
Yorhel
7698bfd980 Split path handling into path.c and replaced rpath() with a better implementation
This is the first step into replacing all code that relies on PATH_MAX,
more changes will follow.
2009-04-23 19:44:37 +02:00