File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,20 +136,6 @@ static double dc_get_time() {
136136 return (tp.tv_sec * 1e3 ) + (tp.tv_nsec / 1e6 );
137137}
138138
139- template <size_t N>
140- static void dc_fix_path (const char *path, char (&dest)[N]) {
141- strncpy (dest, path, N);
142- dest[N - 1 ] = 0 ;
143- char *c = dest;
144- while (*c) {
145- c++;
146- }
147- // Chop off any / at the end of the line
148- while (*c && *c == ' /' ) {
149- *c = 0 ;
150- }
151- }
152-
153139/* *
154140 * Find or populate the dir in the db
155141 * Calls readdir outright if the dir doesn't exist in the db yet,
@@ -237,9 +223,7 @@ dirent *dircache_readdir(dircontext_t *dir) {
237223
238224// opendir(3)
239225dircontext_t *dircache_opendir (const char *path) {
240- char fixed[PATH_MAX]; // Correct any bad slashes
241- dc_fix_path (path, fixed);
242- return dc_find_or_populate (fixed);
226+ return dc_find_or_populate (path);
243227}
244228
245229// rewinddir(3)
You can’t perform that action at this time.
0 commit comments