title: C opendir always NULL
body: <p>So I am working on a directory traversal, and I am unable to get opendir to work the way I want it to. It always fails to open the directory I send it, it gives some unknown error. I usually pass in argv[1], but I gave up and just started hard coding paths.</p>
  
  <pre><code>char *dest = NULL;
  char *filePath = ".";
  char *newPath = NULL;
  
  
  DIR *dirp;
  struct dirent *dp;
  int errno;
  dirp = opendir("/home/cs429/Desktop/test");
  
  struct stat path_stat;
  
  
  
  if(dirp == NULL);
  {
      // Error Handling
      fprintf(stderr, "Error failed to open input directory -%s\n",strerror(errno) );
      return 1;
  }
  </code></pre>
  
  <p>Does anyone see what I could be doing to get NULL? I also get this in gdb:
  ../sysdeps/posix/opendir.c: No such file or directory.</p>