c++ 调用rename 报错 Invalid cross-device link error

原因是rename  方法无法在mount 点使用。
oldpath and newpath are not on the same mounted filesystem. (Linux permits a filesystem to be mounted at multiple points, but rename() does not work across different mount points, even if the same filesystem is mounted on both.)


一般是使用拷贝,然后删除源文件方法解决。



posted @ 2019-07-30 13:23  you_magic  阅读(1738)  评论(0编辑  收藏  举报