Browse Source

* Avoid infinite loop on Unix

git-svn-id: trunk@18242 -
pierre 14 years ago
parent
commit
8dc1ce55c1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tests/test/units/sysutils/tdirex.pp

+ 4 - 1
tests/test/units/sysutils/tdirex.pp

@@ -55,7 +55,10 @@ begin
         begin
           dir:=copy(dir,1,maxpos-1);
           TestDirectoryExists(dir,true);
-        end;
+        end
+      else
+      { if length(dir)<=1, exit test }
+        exit;
     end;
 end;