emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp/files.el: Add `file-name-set-extension`


From: Colin Woodbury
Subject: Re: [PATCH] lisp/files.el: Add `file-name-set-extension`
Date: Thu, 10 Jun 2021 07:40:00 -0700
User-agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194

Good catch Michael, thank you, I had completely forgotten about Windows.  I've updated the patch.

Cheers,
Colin

On Thu, 10 Jun 2021, at 00:46, Michael Albinus wrote:
"Colin Woodbury" <colin@fosskers.ca> writes:

> Hi all,

Hi Colin,

> +          ((equal ?/ (string-to-char (substring file -1))) (error "Filename is a directory: %s" filename))

This shall be (directory-name-p file) . You cannot assume that ?/ is
always the directory separator, for example on MS Windows.

Best regards, Michael.


Attachment: file-name-with-extension.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]