struct adouble ad;
if (stat(adsrc, &st)) /* source has no ressource fork, */
- return AFP_OK;
+ return 0;
/* We are here because :
* -there's no dest folder.
struct adouble ad;
if (stat(adsrc, &st)) /* source has no ressource fork, */
- return AFP_OK;
+ return 0;
/* We are here because :
* -there's no dest folder.
int RF_renamefile_osx(const struct vol *vol, const char *src, const char *dst)
{
char adsrc[ MAXPATHLEN + 1];
+ int err = 0;
strcpy( adsrc, vol->vfs->ad_path( src, 0 ));
- return unix_rename( adsrc, vol->vfs->ad_path( dst, 0 ));
+
+ if (unix_rename( adsrc, vol->vfs->ad_path( dst, 0 )) < 0) {
+ struct stat st;
+
+ err = errno;
+ if (errno == ENOENT && stat(adsrc, &st)) /* source has no ressource fork, */
+ return 0;
+ errno = err;
+ return -1;
+ }
+ return 0;
}
struct vfs_ops netatalk_adouble_osx = {