Cygwin ::stat() 给出“没有这样的文件或目录”;用于安装 cygdrive 的 Samba
我有一些代码在路径名上调用 ::stat() ,该路径名在 Centos 上运行良好,但在 Cygwin 上,当提供的路径名是 samba 安装驱动器上的目录时,它会失败:
struct stat info;
int result1 = ::stat("/cygdrive/h/", &info)
int errno1 = errno;
int result2 = ::stat("/cygdrive/", &info)
int errno2 = errno;
有了这个,我可以看到值:
result1 == -1
errno1 == 2
result2 == 0
errno2 == 0
我怎样才能stat() 从 Cygwin 成功安装了 samba 驱动器?
I have some code calling ::stat() on a pathname which works fine on Centos, but on Cygwin, it fails when the supplied pathname is a directory on a samba mounted drive:
struct stat info;
int result1 = ::stat("/cygdrive/h/", &info)
int errno1 = errno;
int result2 = ::stat("/cygdrive/", &info)
int errno2 = errno;
With this, I can see the values:
result1 == -1
errno1 == 2
result2 == 0
errno2 == 0
How can I stat() a samba mounted drive successfully from Cygwin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论