Gpg.exe and long dir names
John Clizbe
JPClizbe@attbi.com
Thu May 22 18:53:03 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Colin Brown wrote:
>
> I am having a bit of trouble with GnuPG and was wondering if anyone
can help.
> I am trying to feed a file into gpg.exe inside a front end I am
writing, the problem being gpg does not like
> the full path name for the file
> eg. C:\Documents and Settings\Person Here\My Documents\Visual Studio
Projects\WindowsApplication2\bin\Debug\file.txt
> And seems to fallover,
> It is fine when it is just the root dir C:\file.txt
>
> I can *hack* around this by copying the file to the root dir before
encrypting and then copy it back prefer not to do that.
>
The trouble is the spaces in the file/path names. A few ideas from my
own battle scars using unix/Gnu/OpenSource stuff in a Win32 world:
1) Put entire filename and path in quotes - "C:\Documents and
Settings\Person Here\My Documents\Visual Studio
Projects\WindowsApplication2\bin\Debug\file.txt"
2) use 'old-style (8.3)' file and folder names -
C:\Docume~1\%USERNAME%\MyDocu~1\Visual~1\Window~2\bin\debug\file.txt
3) If not already using it, try the Nullify build of GnuPG
(http://www.nullify.org)
4) I agree using the root dir is a 'not good' hack. What about using
%TEMP%\file.txt?
5) Unix-fy the path - ie replace '\' with '/' and escape the spaces
with '\' - "C:/Documents\ and\ Settings/Person\ Here/My\
Documents/Visual\ Studio\ Projects/WindowsApplication2/bin/Debug/file.txt"
Though I think this only works under Cygwin, MinGW32, or Services for
Unix's Interix environments and quotes around the name would be easier.
There may be other hints on MSDN. Try
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnucmg/html/ucmglp.asp
- --
John P. Clizbe Inet: JPClizbe AT attbi DOT com
Golden Bear Networks PGP/GPG KeyID: 0x608D2A10
"Most men take the straight and narrow. A few take the road less
traveled. I chose to cut through the woods."
"There is safety in Numbers... *VERY LARGE PRIME* Numbers
9:00PM Tonight on _REAL_IRONY_: Vegetarian Man Eaten by Cannibals
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-nr1 (Windows 2000)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+zQCuHQSsSmCNKhARAsqhAJ0fV0Y9pLPZUbR9rXwmbarGnfFV9gCgjOXZ
r1RyzgwZbawHWtjSyd/ztho=
=hRI3
-----END PGP SIGNATURE-----