OSDN Git Service

* src/lharc.c (cleaning_files): should print errno.
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Thu, 10 Jul 2003 16:59:26 +0000 (16:59 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Thu, 10 Jul 2003 16:59:26 +0000 (16:59 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@698 6a8cc165-1e22-0410-a132-eb4e3f353aba

src/lharc.c

index b688f37..d9683b1 100644 (file)
@@ -898,11 +898,11 @@ cleaning_files(v_filec, v_filev)
     /* flags & 0x02 :   1: directory, 0 : regular file */
     /* flags & 0x04 :   1: need delete */
 
-    
     for (i = 0; i < filec; i++)
         if (GETSTAT(filev[i], &stbuf) < 0) {
             flags[i] = 0x04;
-            warning("Cannot access \"%s\", ignored.", filev[i]);
+            warning("Cannot access \"%s\" : %s; ignored.", filev[i],
+                    strerror(errno));
         }
         else {
             if (is_regularfile(&stbuf))
@@ -912,7 +912,7 @@ cleaning_files(v_filec, v_filev)
 #ifdef S_IFLNK
             else if (is_symlink(&stbuf)) /* t.okamoto */
                 flags[i] = 0x00;
-#endif          
+#endif
             else {
                 flags[i] = 0x04;
                 warning("Cannot archive \"%s\", ignored.", filev[i]);
@@ -1007,7 +1007,7 @@ find_files(name, v_filec, v_filev)
               n != 2))  ) {
             add_sp(&sp, newname, len+n+1);
         }
-#else       
+#else
         if ((dp->d_ino != 0) &&
         /* exclude '.' and '..' */
             ((dp->d_name[0] != '.') ||