stat: difference between error and non-existing file/directory
schamar opened this issue · comments
Hi there,
smb_fstat returns NULL in case of an error (like a timeout) and also NULL if the file/directory does not exist. Is there a way to differentiate between an error and a file not existing (without listing the parent directory)?
BTW, nt_status on the session is success after the operation even in case of a timeout.
I also tried smb_find in the vain hope that it would return an empty list, if the file doesn't exist and NULL in case of an error, but found that it returns NULL in both cases.
As a side note: The timeout is awfully long (something like 3 minutes). Is there a way to set it? Also (sometimes?) when the socket is broken, my application dies of sigpipe. While I can handle that, I still wonder whether this is an intended behaviour.
The 2 first are good points.
Thanks for the report, issue is fixed, see bin/dsm.c sample to know how to check nt error.
For the side note, I'm aware of this issue. I plan a big rewrite of this lib to fix all I/O thread/timeout issues.