diff options
author | Werner Koch <wk@gnupg.org> | 2010-10-20 15:06:15 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-10-20 15:06:15 +0000 |
commit | 960df54ce8d479b42813dc14789cbf9299e207b0 (patch) | |
tree | f2857302a3dfa5f0361f5d13b833ebfe7aac76ce /src/init.c | |
parent | d717d13e27cb02fbbb015854e3811d9b0aad3c06 (diff) | |
download | libgpg-error-960df54ce8d479b42813dc14789cbf9299e207b0.tar.gz |
Fix for W32CE.
Diffstat (limited to 'src/init.c')
-rw-r--r-- | src/init.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -235,6 +235,27 @@ get_locale_dir (void) p = strrchr (result, '\\'); if (p) *p = 0; + /* If we are installed below "bin" strip that part and + use the top directory instead. + + Background: Under Windows we don't install GnuPG + below bin/ but in the top directory with only share/, + lib/, and etc/ below it. One of the reasons is to + keep the the length of the filenames at bay so not to + increase the limited length of the PATH envvar. + Another and more important reason, however, is that + the very first GPG versions on W32 were installed + into a flat directory structure and for best + compatibility with these versions we didn't changed + that later. For WindowsCE we can right away install + it under bin, though. The hack with detection of the + bin directory part allows us to eventually migrate to + such a directory layout under plain Windows without + the need to change libgpg-error. */ + p = strrchr (result, '\\'); + if (p && !strcmp (p+1, "bin")) + *p = 0; + /* Append the static part. */ strcat (result, SLDIR); } } |