Re: Problem with add directory using NT cvs server

"Christian Stein" <[email protected]> Wed, 3 Jul 2002 13:32:20 +0200
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Organization CollabNet Hosting
Message-ID <[email protected]>
Adding following lines to "libsrc/.../Client.java" [line 535 ff]

  public void updateAdminData(String localDirectory, String repositoryPath,
  Entry entry) throws IOException {

    final String absolutePath = localPath + '/' + localDirectory;
    repositoryPath = repositoryPath.substring(getRepository().length() + 1);
    if (repositoryPath.startsWith("/")) { //NOI18N
      repositoryPath = repositoryPath.substring(1);
    }

+   if (repositoryPath.startsWith(".")) { //NOI18N
+     repositoryPath = repositoryPath.substring(1);
+   }
+   if (repositoryPath.startsWith("CVSROOT/Emptydir")) { //NOI18N //
+     repositoryPath = repositoryPath.substring(16);              // (*)
+   }                                                             //
+   if (repositoryPath.startsWith("/")) { //NOI18N
+     repositoryPath = repositoryPath.substring(1);
+   }

Resolves the "/123" problem. Don't know, if this is the right
position for the fix. Btw: it only works, if _magic_ "CVS/Repository"
contains "." and not "CVSROOT/Emptydir".

(*) doesn't hurt - but as the rest of the lib assumes that "." is
provided as the _magic_ marker, it does not fix the problem here.

Christian