summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-05-16 10:20:58 +0200
committerYorhel <git@yorhel.nl>2009-05-16 10:20:58 +0200
commita0bf6deebbc7317d2497ec29eedb264d836ccfd9 (patch)
tree3edaa6b0e9bf1e739f8102158026600af04e5abb
parentaef88fb773a5f8e70447c3fc6c00c59e17248015 (diff)
Removed reliance on dirfd()
-rw-r--r--ChangeLog1
-rw-r--r--src/path.c5
-rw-r--r--src/path.h1
3 files changed, 2 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4889cb7..1665542 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
git - ?
- Implemented hard link detection
- Properly select the next item after deletion
+ - Removed reliance of dirfd()
1.5 - 2009-05-02
- Fixed incorrect apparent size on directory refresh
diff --git a/src/path.c b/src/path.c
index 6ff5412..949065b 100644
--- a/src/path.c
+++ b/src/path.c
@@ -198,18 +198,13 @@ path_real_done:
char *path_real(const char *orig) {
int links = 0;
char *tmp, *ret;
- DIR *d;
if(orig == NULL)
return NULL;
- if((d = opendir(".")) == NULL)
- return NULL;
tmp = path_absolute(orig);
ret = path_real_rec(tmp, &links);
free(tmp);
- fchdir(dirfd(d));
- closedir(d);
return ret;
}
diff --git a/src/path.h b/src/path.h
index c3312eb..353500e 100644
--- a/src/path.h
+++ b/src/path.h
@@ -32,6 +32,7 @@
- Potentionally slow
- Doesn't check return value of malloc() and realloc()
- path_real doesn't check for the existance of the last component
+ - cwd is unreliable after path_real
*/
#ifndef _path_h