greg(a)alphatech.com (Greg Klanderman) writes:
Jan, what do you think is the right place to insert the
"anonymous@"?
Should we add it to each entry in package-get-download-sites?
Just have package-get-remote-filename add it. Possibly test first if
there is no "@" present in the site-name.
Like this (untested)
(defun package-get-remote-filename (search filename)
"Return FILENAME as a remote filename.
It first checks if FILENAME already is a remote filename. If it is
not, then it uses the (car search) as the remote site-name and the (cadr
search) as the remote-directory and concatenates filename. In other
words
anonymous@site-name:remote-directory/filename
No anonymous@ is added if site-name is of the form user@site.
"
(if (efs-ftp-path filename)
filename
(let ((dir (cadr search)))
(concat (if (string-match "@" (car search))
"/"
"/anonymous@")
(car search) ":"
(if (string-match "/$" dir)
dir
(concat dir "/"))
filename))))