]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
make-upclient-clean-up-after-itself-20011005
authorNathan Neulinger <nneul@umr.edu>
Fri, 5 Oct 2001 22:13:33 +0000 (22:13 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 5 Oct 2001 22:13:33 +0000 (22:13 +0000)
to preclude lots of turds being left in /tmp from failures

src/update/client.c

index abd0215831ec3ef78e72fbbdf913ff6c9d33057d..9ec65f3408976c4ed78255d4d4d6589108d3bf9c 100644 (file)
@@ -314,8 +314,11 @@ again:
                                                  mode, atime, time);
                    if (errcode == 1) /* this file failed, but keep trying */
                      goto fail_dirbuf;  
-                   if (errcode == -1) /* time to quit */
+                   if (errcode == -1) /* time to quit */ {
+                     fclose(stream);
+                     unlink(dirbuf);
                      return -1;
+                   }
                }
 
            }