GNU bug report logs - #22996
[PATCH] Use directory_files_internal_unwind() in directory_files_internal ()

Previous Next

Package: emacs;

Reported by: Alexander Kuleshov <kuleshovmail <at> gmail.com>

Date: Sat, 12 Mar 2016 13:51:01 UTC

Severity: minor

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22996 in the body.
You can then email your comments to 22996 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22996; Package emacs. (Sat, 12 Mar 2016 13:51:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexander Kuleshov <kuleshovmail <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 12 Mar 2016 13:51:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alexander Kuleshov <kuleshovmail <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Alexander Kuleshov <kuleshovmail <at> gmail.com>
Subject: [PATCH] Use directory_files_internal_unwind() in
 directory_files_internal ()
Date: Sat, 12 Mar 2016 19:49:37 +0600
src/dired.c (directory_files_internal): use directory_files_internal_unwind()
to prevent code duplication.
---
 src/dired.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/dired.c b/src/dired.c
index ebc7029..b5b6af6 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -307,9 +307,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
 	}
     }
 
-  block_input ();
-  closedir (d);
-  unblock_input ();
+  directory_files_internal_unwind ((void*) d);
 #ifdef WINDOWSNT
   if (attrs)
     Vw32_get_true_file_attributes = w32_save;
-- 
2.8.0.rc0.61.g9f22707





Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 20 Mar 2016 01:49:02 GMT) Full text and rfc822 format available.

Notification sent to Alexander Kuleshov <kuleshovmail <at> gmail.com>:
bug acknowledged by developer. (Sun, 20 Mar 2016 01:49:02 GMT) Full text and rfc822 format available.

Message #10 received at 22996-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alexander Kuleshov <kuleshovmail <at> gmail.com>
Cc: 22996-done <at> debbugs.gnu.org
Subject: Re: [PATCH] Use directory_files_internal_unwind() in
 directory_files_internal ()
Date: Sat, 19 Mar 2016 18:47:47 -0700
[Message part 1 (text/plain, inline)]
Thanks for pointing out the code infelicity. I installed the attached, which 
cleans it up in a more-general way.
[0001-No-need-to-block-input-when-reading-directories.txt (text/plain, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Apr 2016 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.