comparison src/fileio.c @ 1004:09d0e83c29b8 v7.0.130

updated for version 7.0-130
author vimboss
date Tue, 10 Oct 2006 16:44:07 +0000
parents 0e3e208b4b90
children 992d5c69d5e9
comparison
equal deleted inserted replaced
1003:a1c1f001b99d 1004:09d0e83c29b8
414 filemess(curbuf, fname, (char_u *)_("is not a file"), 0); 414 filemess(curbuf, fname, (char_u *)_("is not a file"), 0);
415 msg_end(); 415 msg_end();
416 msg_scroll = msg_save; 416 msg_scroll = msg_save;
417 return FAIL; 417 return FAIL;
418 } 418 }
419 }
420 #endif
421
422 #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
423 /*
424 * MS-Windows allows opening a device, but we will probably get stuck
425 * trying to read it.
426 */
427 if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE)
428 {
429 filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0);
430 msg_end();
431 msg_scroll = msg_save;
432 return FAIL;
419 } 433 }
420 #endif 434 #endif
421 435
422 /* set default 'fileformat' */ 436 /* set default 'fileformat' */
423 if (set_options) 437 if (set_options)
3161 errmsg = (char_u *)_("is not a file or writable device"); 3175 errmsg = (char_u *)_("is not a file or writable device");
3162 goto fail; 3176 goto fail;
3163 } 3177 }
3164 if (c == NODE_WRITABLE) 3178 if (c == NODE_WRITABLE)
3165 { 3179 {
3180 # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
3181 /* MS-Windows allows opening a device, but we will probably get stuck
3182 * trying to write to it. */
3183 if (!p_odev)
3184 {
3185 errnum = (char_u *)"E796: ";
3186 errmsg = (char_u *)_("writing to device disabled with 'opendevice' option");
3187 goto fail;
3188 }
3189 # endif
3166 device = TRUE; 3190 device = TRUE;
3167 newfile = TRUE; 3191 newfile = TRUE;
3168 perm = -1; 3192 perm = -1;
3169 } 3193 }
3170 else 3194 else