[Top][All Lists]

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

file-exists-p on empty string

From: Evgeny Zajcev
Subject: file-exists-p on empty string
Date: Wed, 27 Feb 2019 15:29:53 +0300

It was quite surprising for me that

  (file-exists-p "")
  ==> t

I thought that `file-exists-p` resembles stat, such as
  $ stat ""
  No such file or directory

This is because `file-exists-p` uses `expand-file-name`, which returns current directory for empty string

Would not it be more correct for `file-exists-p` to return `nil` for empty string, and if someone wants current directory he will use "." as filename?



reply via email to

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