/[winpt]/trunk/Src/WinPT.cpp
ViewVC logotype

Diff of /trunk/Src/WinPT.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 168 by twoaday, Fri Jan 27 10:08:10 2006 UTC revision 172 by twoaday, Mon Jan 30 13:47:35 2006 UTC
# Line 41  Line 41 
41  #include "wptCardEdit.h"  #include "wptCardEdit.h"
42  #include "wptCrypto.h"  #include "wptCrypto.h"
43    
44    void remove_crit_file_attrs (const char *fname, int force);
45    
46    
47  HINSTANCE glob_hinst;   /* global instance for the dialogs */  HINSTANCE glob_hinst;   /* global instance for the dialogs */
48  HWND glob_hwnd;         /* global window handle for the dialogs */  HWND glob_hwnd;         /* global window handle for the dialogs */
# Line 132  gpg_prefs_ok (void) Line 134  gpg_prefs_ok (void)
134  }  }
135    
136    
137    /* Check gpg files if they are read-only and ask the user
138       if this should be corrected. */
139    static void
140    check_readonly_attr (const char *homedir)
141    {
142        const char *files[] = {"pubring.gpg", "secring.gpg", "trustdb.gpg", NULL};
143        char *file;
144        int i;
145    
146        for (i=0; files[i] != NULL; i++) {
147            file = make_filename (homedir, files[i], NULL);
148            remove_crit_file_attrs (file, 0);
149            free_if_alloc (file);
150        }
151    }
152    
153    
154  /* Load the GPG environment. On the first start, some  /* Load the GPG environment. On the first start, some
155     checks are performed to find out in what state GPG is.     checks are performed to find out in what state GPG is.
# Line 169  load_gpg_env (void) Line 187  load_gpg_env (void)
187              return (2);              return (2);
188          }          }
189      }      }
190        check_readonly_attr (p);
191      pkr = make_filename (p, "pubring", "gpg");      pkr = make_filename (p, "pubring", "gpg");
192      free_if_alloc (p);      free_if_alloc (p);
193      if (!pkr)      if (!pkr)

Legend:
Removed from v.168  
changed lines
  Added in v.172

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26