is_dir() inconsistencies
While using is_dir() (is_file() is probably also affected), I came across a certain behavior, which may not be desired. I was checking a directory on the remote server and it returned false. After looking through the code, I saw it was checking whether the target object can be opened as a directory, which required my user to have permissions on it. Since my user lacked these permissions, the is_dir() call returned false, even if the target object was a directory in all its glory.
I can see how this could make sense, however it yields false results, hence I propose either changing the checking mechanism to reflect the correct state or renaming the functions.
Hi,
thank you for the information. I think (in this case) the is_dir() function should return true.
I will take a look at it.
Cheers,
Jan
I think it can be fixed similarly to the example in Net::SFTP::Foreign documentation.