* NEW: afpd: Automatic conversion of ._ AppleDouble files
created by OS X. Bug #550.
* FIX: afpd: Fix a crash in of_closefork(). Bug #551.
+* FIX: dbd: Don't print message "Ignoring ._file" for every ._ file.
+ Bug #552.
Changes in 3.1.0
================
return db_cnid;
}
-static void check_orphaned(const char *name)
+static int check_orphaned(const char *name)
{
int rc;
struct stat sb;
if (rc != 0 && errno == ENOENT) {
dbd_log(LOGSTD, "Removing orphaned AppleDouble \"%s/%s\"", cwdbuf, name);
unlink(name);
+ return 1;
}
+ return 0;
}
/*
**************************************************************************/
/* Check for invalid names and orphaned ._ files */
- if (S_ISREG(st.st_mode) && (strncmp(ep->d_name, "._", strlen("._")) == 0))
- check_orphaned(ep->d_name);
-
- if (!vol->vfs->vfs_validupath(vol, ep->d_name)) {
- dbd_log(LOGSTD, "Ignoring \"%s/%s\"", cwdbuf, ep->d_name);
- continue;
+ if (S_ISREG(st.st_mode) && (strncmp(ep->d_name, "._", strlen("._")) == 0)) {
+ if (check_orphaned(ep->d_name))
+ continue;
+ if (vol->vfs->vfs_validupath(vol, ep->d_name)) {
+ dbd_log(LOGSTD, "Bad AppleDouble \"%s/%s\"", cwdbuf, ep->d_name);
+ continue;
+ }
}
/* Check for appledouble file, create if missing, but only if we have addir */