C/Followup Question
Expert: Narendra - 8/21/2006
QuestionHi,
Thanks for your hint on retrieving the error message on opening an odd file format. I used fopen to open the file. Based on the error message, it is not reported correctly. The errno is 2 which stands for 'no such file or directory'. I verified and noted the file is in the right spot! Really weird! The filename is cabinet_1273-1-v1.bom.3. Is it possible that fopen failed to open a file with double '.' at the end of the name?
AnswerI don't think the double "." matters.
Check the file permissions.
Does everybody have "read" and "write" permissions?
Also, check all the directories in the path. Does all of them have correct permissions?
Is it a complete path or is it comprised of soft links?
Is it on the same system or a different host on the same subnet?
Could it be that, there is a mis-match in the uppercase/lowercase lettering in the file path name?
If the file is present there, then you must be able to open it with fopen().
Try to use "ls -l" on the filename that you are trying to open using fopen() (Copy and paste the exactly same name from the code), from the same directory where you are executing this executable.