RE: My Documents folder
> -----Original Message-----
> From: owner-lisp-hug@lispworks.com
> [mailto:owner-lisp-hug@lispworks.com] On Behalf Of Marco Antoniotti
> Sent: Friday, December 01, 2006 1:54 PM
> To: Sheldon Ball
> Cc: Lisp Hug Lispworks
> Subject: Re: My Documents folder
>
>
>
> On Dec 1, 2006, at 4:01 AM, Sheldon Ball wrote:
>
> > I would like to be able to set a directory specific for
> each user for
> > printing documents from LWW5.
> > I thought:
> >
> > (setf *document_dir*
> > (concatenate 'string
> ^^^^^^^^^^^ Bad bad bad idea!!!!
> > (format-pathname (sys:get-folder-path
> > :my-documents))
> > "/"))
> >
> > within the initialization function of deliver would obtain
> that folder
> > when a user starts the application, but this seems not
> necessarily the
> > case.
> >
> > For example, the value of *document_dir* at the time the
> application
> > was delivered was:
> > C:\Documents and Settings\Sheldon Ball\ On computers at the
> Veterans
> > Administration, my "My Documents" folder
> > is:
> > C:\Documents and Settings\Sheldon Ball\vhamacballsh\My Documents\
> >
> > The 'vhamacballsh' folder is my user name.
>
> (merge-pathnames "My Documents/" (user-homedir-pathname))
>
> is more kosher and less error prone.
No, it's guaranteed erroneous on non-english Windows.
In fact, (sys:get-folder-path :my-documents) should do exactly what Sheldon Ball wants it to. The problem may well be with the unorthodox path-building with concatenate.
The error number, 5, is probably form Windows. If so, it means "No access". Perhaps the user doesn't have the right to create subdirectories in his 'Mine dokumenter' (would be strange though).
Actually, reading the original post again, I see that the error message concerns the directory
C:\Documents and Settings\Sheldon Ball\vhamacballsh\My Documents\
which seems to have two usernames in its path. Perhaps it should have been
C:\Documents and Settings\vhamacballsh\My Documents\
So the error may indeed be the path-building.
Eivind