<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7097</bug_id>
          
          <creation_ts>2014-12-23 04:58:47 +0000</creation_ts>
          <short_desc>Pseudo fails to properly ENOTDIR on stat/lstat</short_desc>
          <delta_ts>2015-05-21 17:54:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Pseudo</product>
          <component>pseudo</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>aerial9</reporter>
          <assigned_to name="Seebs">seebs</assigned_to>
          <cc>sgw</cc>
    
    <cc>yp.pseudo.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47655</commentid>
    <comment_count>0</comment_count>
    <who name="">aerial9</who>
    <bug_when>2014-12-23 04:58:47 +0000</bug_when>
    <thetext>This was causing a bug with a makefile that expected $(wildcard */) to only return directories. Sort of explained by: http://pastie.org/9795375

Steps to reproduce:
$ touch afile
$ stat afile/
stat: cannot stat ‘afile/’: Not a directory
$ LD_PRELOAD=&quot;libpsuedo.so&quot; PSEUDO_PREFIX=. stat afile/
  File: ‘afile/’
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
  &lt;etc&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47716</commentid>
    <comment_count>1</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2015-01-02 19:04:52 +0000</bug_when>
    <thetext>Huh, that&apos;s fascinating! I was not aware of this idiom. Apparently, the stat syscall will take a literal filename of &quot;a/&quot; as meaning the same thing as &quot;a&quot;, but will fail with ENOTDIR if a is not a directory. I&apos;d never seen that before, and my initial check of the documentation doesn&apos;t actually turn it up, but it&apos;s probably possible to implement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47717</commentid>
    <comment_count>2</comment_count>
    <who name="">aerial9</who>
    <bug_when>2015-01-02 19:40:08 +0000</bug_when>
    <thetext>It seems to be explained in path_resolution(7), specifically:

   Trailing slashes
       If a pathname ends in a &apos;/&apos;, that forces resolution of the preceding component as in Step 2: it has to exist and resolve to a directory.  Oth‐
       erwise, a trailing &apos;/&apos; is ignored.  (Or, equivalently, a pathname with a trailing &apos;/&apos; is equivalent to the pathname obtained by appending  &apos;.&apos;
       to it.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51211</commentid>
    <comment_count>3</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2015-05-21 17:54:02 +0000</bug_when>
    <thetext>Oh, whoops. This got fixed a while back, I never updated the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>