Patch for FilePlugin - bug 3649

Tony Garnock-Jones tonyg at lshift.net
Thu May 18 11:17:26 UTC 2006


Hi Ian.

I've found and fixed a problem in the Unix FilePlugin regarding
directory deletion. The problem is already covered by a test case in the
3.8 and 3.9 images. A description of the fault is here:
http://bugs.impara.de/view.php?id=3649 and I've attached the patch
against SVN trunk.

Regards,
  Tony
-------------- next part --------------
Index: platforms/unix/plugins/FilePlugin/sqUnixFile.c
===================================================================
--- platforms/unix/plugins/FilePlugin/sqUnixFile.c	(revision 1509)
+++ platforms/unix/plugins/FilePlugin/sqUnixFile.c	(working copy)
@@ -122,6 +122,12 @@
     return false;
   if (!sq2uxPath(pathString, pathStringLength, name, MAXPATHLEN, 1))
     return false;
+  if (lastPathValid && !strcmp(lastPath, name)) {
+    closedir(openDir);
+    lastPathValid = false;
+    lastIndex = -1;
+    lastPath[0] = '\0';
+  }
   return rmdir(name) == 0;
 }
 


More information about the Vm-dev mailing list