Browse Source

* Avoid ChDir('') gives sometimes DosError 3 !!

pierre 26 years ago
parent
commit
af52fb326c
1 changed files with 6 additions and 2 deletions
  1. 6 2
      ide/text/fpmfile.inc

+ 6 - 2
ide/text/fpmfile.inc

@@ -94,7 +94,8 @@ begin
          GetDir(DriveNumber,StoreDir2);
          GetDir(DriveNumber,StoreDir2);
          ChDir(Copy(FileDir,1,2));
          ChDir(Copy(FileDir,1,2));
        end;
        end;
-     ChDir(FileDir);
+     if FileDir<>'' then
+       ChDir(FileDir);
      New(D, Init(OpenExts,'Open a file','File to ope~n~',fdOpenButton,0));
      New(D, Init(OpenExts,'Open a file','File to ope~n~',fdOpenButton,0));
      OpenIt:=Desktop^.ExecView(D)<>cmCancel;
      OpenIt:=Desktop^.ExecView(D)<>cmCancel;
      if OpenIt then
      if OpenIt then
@@ -179,7 +180,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.13  1999-08-16 18:25:20  peter
+  Revision 1.14  1999-10-27 10:44:08  pierre
+   * Avoid ChDir('') gives sometimes DosError 3 !!
+
+  Revision 1.13  1999/08/16 18:25:20  peter
     * Adjusting the selection when the editor didn't contain any line.
     * Adjusting the selection when the editor didn't contain any line.
     * Reserved word recognition redesigned, but this didn't affect the overall
     * Reserved word recognition redesigned, but this didn't affect the overall
       syntax highlight speed remarkably (at least not on my Amd-K6/350).
       syntax highlight speed remarkably (at least not on my Amd-K6/350).