[前][次][番号順一覧][スレッド一覧]

ruby-changes:37312

From: nobu <ko1@a...>
Date: Sat, 24 Jan 2015 19:57:42 +0900 (JST)
Subject: [ruby-changes:37312] nobu:r49393 (trunk): dln_find.c: regular files only

nobu	2015-01-24 19:57:35 +0900 (Sat, 24 Jan 2015)

  New Revision: 49393

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49393

  Log:
    dln_find.c: regular files only
    
    * dln_find.c (dln_find_1): search regular files only.  based on
      the patch by Alex Coomans in [ruby-core:67766].  [Bug #10776]

  Modified files:
    trunk/dln_find.c
Index: dln_find.c
===================================================================
--- dln_find.c	(revision 49392)
+++ dln_find.c	(revision 49393)
@@ -278,7 +278,7 @@ dln_find_1(const char *fname, const char https://github.com/ruby/ruby/blob/trunk/dln_find.c#L278
 	}
 #endif /* _WIN32 or __EMX__ */
 
-	if (stat(fbuf, &st) == 0 && !S_ISDIR(st.st_mode)) {
+	if (stat(fbuf, &st) == 0 && S_ISREG(st.st_mode)) {
 	    if (exe_flag == 0) return fbuf;
 	    /* looking for executable */
 	    if (eaccess(fbuf, X_OK) == 0) return fbuf;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]