🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #563

vm-make-tempfile-name and directories

#563
From: Glenn Morris
Date: Tue, 19 Apr 2005 19:56
30 lines
1971 bytes

I received a multi-part MIME message with a number of images.
For some silly reason, these had Content-Types whose name part
contained a directory component, eg:

Content-Type: image/gif; name="images/keytile-topright-white.gif"

Trying to view this with an external viewer failed, because VM was
attempting to use temporary files of the form "/tmp/images/...", and
the images/ subdirectory of course did not exist.

Since vm-make-tempfile-name basically just does

(expand-file-name proposed-filename vm-temp-file-directory)

maybe it should remove any directory part from proposed-filename?


***************
*** 618,623 ****
--- 618,625 ----
      file ))
  
  (defun vm-make-tempfile-name (&optional filename-suffix proposed-filename)
+   (if (stringp proposed-filename)
+       (setq proposed-filename (file-name-nondirectory proposed-filename)))
    (let (filename)
      (cond ((and (stringp proposed-filename)
  		(not (file-exists-p
Technical Details
Message-ID: <rill7eilqq.fsf@xpc14.ast.cam.ac.uk>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!proxad.net!news.clara.net!valentin.news.clara.net!feed2.jnfs.ja.net!jnfs.ja.net!gemini.csx.cam.ac.uk!news.cam.ac.uk!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,48cd84d85b02462,start
X-Google-Attributes: gidf6829,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!proxad.net!news.clara.net!valentin.news.clara.net!feed2.jnfs.ja.net!jnfs.ja.net!gemini.csx.cam.ac.uk!news.cam.ac.uk!not-for-mail
From: Glenn Morris <gmorris+news@ast.cam.ac.uk>
Newsgroups: gnu.emacs.vm.bug
Subject: vm-make-tempfile-name and directories
Date: Tue, 19 Apr 2005 20:56:29 +0100
Organization: None
Lines: 30
Message-ID: <rill7eilqq.fsf@xpc14.ast.cam.ac.uk>
NNTP-Posting-Host: xpc14.ast.cam.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spook: insurgent detonators Hizballah MD5 Romania bomb
X-Ran: cY*p$L4Uz9/_Bzj"z8X#Xa[^%>A}ua1Z;;K?f_sbw#C:}/;xGs{~UW]Zt~Xk`iF{%q<kQ1
X-Hue: dark khaki
X-Attribution: GM
Mail-Copies-To: nobody
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Cancel-Lock: sha1:pPIKrLVsx1KwUXBqAvFaznAKSEs=