title: fopen() return "No such file or directory"
body: <p>I have some problem with fopen() function in C. </p>
  
  <p>I'am parsed directory and put all the paths to char array(char**). After that i should to open all these files. And...
  fopen returns "No such file or directory" for some files. And I Am really don't understand, why.</p>
  
  <ol>
  <li>All paths are right. I checked it.</li>
  <li>I have all privileges to
      open these files.</li>
  <li>If I copy path to file from error log and try
      to open only this file via my programm - it works.</li>
  <li>Others
      programms don't work with these files(i think).</li>
  </ol>
  
  <p>What can I do wrong?</p>
  
  <pre><code>int main(int argc, char *argv[]){
      char** set = malloc(10000*sizeof(char*));
      char* path = argv[1];
      listdir(path, set); /* Just parse directory. Paths from the root. No problem in this function.  all paths in the variable "set" are right */
      int i=0;
      while(i&lt;files){ /* files is number of paths */
          FILE* file = fopen(set[i++],"rb");
          fseek(file, 0L, SEEK_END);
          int fileSize = ftell(file);
          rewind(file);
          /*reading bytes from file to some buffer and close current file */
          i++;
      }
  }
  </code></pre>