View Single Post
Old 12-21-2004, 08:04 AM   #29 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,705
redhead is on a distinguished road
Code:
   if(!dir_pointer)
     {
       printf("Error reading from directory\n");
       return -1;
     }
Which means it has trouble opening the directory you want it to search in.
This can happen due to many things, one is that the opendir() function is slightly different on your system than on mine, another thing could be theres a typo in the directory argument, yet another one could be that my program fails, when it has to open a directory starting with '/' as well as a noumerous others..
But on my system it has no problem at all:
Quote:
{105} ~> ls /usr/lib/*.15
/usr/lib/liblber.so.2.0.15
/usr/lib/libldap.so.2.0.15
/usr/lib/libldap_r.so.2.0.15
{106} ~> ./di .15 /usr/lib
Found files:
liblber.so.2.0.15
libldap.so.2.0.15
libldap_r.so.2.0.15
So from my point of view it is working as expected.
This is one of the reasons I didn't wanted to get into this in teh first place, since it is so system specific, when dealing with something like file/directory structures.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote