[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim c805461 2/4: * pyim-dcache.el (pyim-dcache-get-val
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim c805461 2/4: * pyim-dcache.el (pyim-dcache-get-value-from-file): better handle file is nil or "". |
Date: |
Tue, 14 Dec 2021 19:57:35 -0500 (EST) |
branch: externals/pyim
commit c8054610dfaf3f35af193cfd1d40a9ea0a7a57e8
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* pyim-dcache.el (pyim-dcache-get-value-from-file): better handle file is
nil or "".
---
pyim-dcache.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyim-dcache.el b/pyim-dcache.el
index 577adbc..8fb5cfa 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -144,7 +144,8 @@ dcache 文件的方法让 pyim 正常工作。")
(defun pyim-dcache-get-value-from-file (file)
"读取保存到 FILE 里面的 value."
- (when (file-exists-p file)
+ (when (and (> (length file) 0)
+ (file-exists-p file))
(with-temp-buffer
(insert-file-contents file)
(ignore-errors