-#ifdef USE_IMAP
- if (!Context || Context->magic != M_IMAP)
-#endif
-#ifdef USE_POP
- if (!Context || Context->magic != M_POP)
-#endif
-#ifdef USE_NNTP
- if (!Context || Context->magic != M_NNTP)
-#endif
- /* check device ID and serial number instead of comparing paths */
- if (!Context || !Context->path
- || stat (Context->path, &contex_sb) != 0) {
- contex_sb.st_dev = 0;
- contex_sb.st_ino = 0;
- }
+ if ((!Context || mx_is_local (Context->magic-1)) && stat (Context->path, &contex_sb) != 0) {
+ /* check device ID and serial number instead of comparing paths */
+ contex_sb.st_dev = 0;
+ contex_sb.st_ino = 0;
+ }