summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index f1f890430f1..cd35fe38350 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2308,7 +2308,8 @@ it returns nil or exits non-locally."
"Warn if an attempt to open file of SIZE bytes may run out of memory."
(when (and (numberp size) (not (zerop size))
(integerp out-of-memory-warning-percentage))
- (let ((meminfo (memory-info)))
+ (let* ((default-directory temporary-file-directory)
+ (meminfo (memory-info)))
(when (consp meminfo)
(let ((total-free-memory (float (+ (nth 1 meminfo) (nth 3 meminfo)))))
(when (> (/ size 1024)