* FIX: dbd: remove orphaned ._ AppleDouble files. Bug #549.
* NEW: afpd: Automatic conversion of ._ AppleDouble files
created by OS X. Bug #550.
+* FIX: afpd: Fix a crash in of_closefork(). Bug #551.
Changes in 3.1.0
================
/* Somone has used write_fork, we assume file was changed, register it to file change event api */
if (ofork->of_flags & AFPFORK_MODIFIED) {
struct dir *dir = dirlookup(ofork->of_vol, ofork->of_did);
- bstring forkpath = bformat("%s/%s", bdata(dir->d_fullpath), of_name(ofork));
- fce_register(FCE_FILE_MODIFY, bdata(forkpath), NULL, fce_file);
- bdestroy(forkpath);
+ if (dir) {
+ bstring forkpath = bformat("%s/%s", bdata(dir->d_fullpath), of_name(ofork));
+ fce_register(FCE_FILE_MODIFY, bdata(forkpath), NULL, fce_file);
+ bdestroy(forkpath);
+ }
}
ad_unlock(ofork->of_ad, ofork->of_refnum, ofork->of_flags & AFPFORK_ERROR ? 0 : 1);