Ticket #119: mc-ru-fork-autoattrs.patch
File mc-ru-fork-autoattrs.patch, 1.4 KB (added by slavazanko, 15 years ago) |
---|
-
mc/src/filegui.c
50 50 51 51 #include <sys/types.h> 52 52 #include <sys/stat.h> 53 #include <sys/statfs.h> 53 54 #include <unistd.h> 54 55 55 56 #include "global.h" … … 67 68 #include "util.h" /* strip_password() */ 68 69 #include "tty.h" 69 70 71 #ifndef MSDOS_SUPER_MAGIC 72 #define MSDOS_SUPER_MAGIC 0x4d44 73 #endif //MSDOS_SUPER_MAGIC 74 75 #ifndef NTFS_SB_MAGIC 76 #define NTFS_SB_MAGIC 0x5346544e 77 #endif //NTFS_SB_MAGIC 78 79 #ifndef PROC_SUPER_MAGIC 80 #define PROC_SUPER_MAGIC 0x9fa0 81 #endif //PROC_SUPER_MAGIC 82 83 #ifndef SMB_SUPER_MAGIC 84 #define SMB_SUPER_MAGIC 0x517B 85 #endif //SMB_SUPER_MAGIC 86 87 #ifndef NCP_SUPER_MAGIC 88 #define NCP_SUPER_MAGIC 0x564c 89 #endif //NCP_SUPER_MAGIC 90 91 70 92 /* }}} */ 71 93 72 94 /* Hack: the vfs code should not rely on this */ … … 865 887 struct stat buf; 866 888 int val; 867 889 QuickDialog Quick_input; 890 static struct statfs stfs; 868 891 char *def_text; 869 892 g_return_val_if_fail (ctx != NULL, NULL); 870 893 871 894 def_text = g_strdup(def_text_orig); 872 895 896 if (statfs(def_text, &stfs)==0) { 897 if (stfs.f_type==MSDOS_SUPER_MAGIC || 898 stfs.f_type==NTFS_SB_MAGIC || 899 stfs.f_type==SMB_SUPER_MAGIC || 900 stfs.f_type==NCP_SUPER_MAGIC 901 ) { 902 ctx->op_preserve=0; 903 } 904 } 905 873 906 #if 0 874 907 message (1, __FUNCTION__, "text = `%s' \n def_text = `%s'", text, 875 908 def_text);