Actually test vl's new code and make it work to fix the build farm :-).
authorJeremy Allison <jra@samba.org>
Sat, 19 Jan 2008 02:39:29 +0000 (18:39 -0800)
committerJeremy Allison <jra@samba.org>
Sat, 19 Jan 2008 02:39:29 +0000 (18:39 -0800)
Jeremy.

source/smbd/trans2.c

index 5464ef2ed01dfb6b92fbb75e227b3529fea9f3ff..3e1ba8ad48d50532fb1d81557b39e0f09ee86318 100644 (file)
@@ -3299,12 +3299,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
                }
        }
 
-       nlink = sbuf.st_nlink;
-
-       if ((nlink > 0) && delete_pending) {
-               nlink -= 1;
-       }
-
        if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) {
                return ERROR_NT(NT_STATUS_INVALID_LEVEL);
        }
@@ -3322,6 +3316,16 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
        if (!mode)
                mode = FILE_ATTRIBUTE_NORMAL;
 
+       nlink = sbuf.st_nlink;
+
+       if (nlink && (mode&aDIR)) {
+               nlink = 1;
+       }
+
+       if ((nlink > 0) && delete_pending) {
+               nlink -= 1;
+       }
+
        fullpathname = fname;
        if (!(mode & aDIR))
                file_size = get_file_size(sbuf);
@@ -3560,7 +3564,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
                        data_size = 24;
                        SOFF_T(pdata,0,allocation_size);
                        SOFF_T(pdata,8,file_size);
-                       SIVAL(pdata,16,(mode&aDIR)?1:nlink);
+                       SIVAL(pdata,16,nlink);
                        SCVAL(pdata,20,delete_pending?1:0);
                        SCVAL(pdata,21,(mode&aDIR)?1:0);
                        SSVAL(pdata,22,0); /* Padding. */
@@ -3632,7 +3636,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
                        pdata += 40;
                        SOFF_T(pdata,0,allocation_size);
                        SOFF_T(pdata,8,file_size);
-                       SIVAL(pdata,16,(mode&aDIR)?1:nlink);
+                       SIVAL(pdata,16,nlink);
                        SCVAL(pdata,20,delete_pending);
                        SCVAL(pdata,21,(mode&aDIR)?1:0);
                        SSVAL(pdata,22,0);