From 42642161f6beb70c3197c4f8b46cccafa58bd6e4 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 30 Mar 2008 03:24:19 +0200 Subject: Do not ignore subdirectories on CVSNT servers With my CVSNT server (1.11.1.3 (Build 57j), CVSPS ignored files in subdirectories. The reason was that in output of cvs rlog, files were separated from repository path by / whereas directories by \: RCS file: d:\cvs\laser/BUILD.INC,v ... RCS file: d:\cvs\laser\DLG/DABOUT.DLG,v Now, if filename does not start with repository path, another comparison is done to check whether the only difference is the last slash or backslash. Signed-off-by: Michal Sojka --- cvsps.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cvsps.c b/cvsps.c index 1fa41d2..60e8504 100644 --- a/cvsps.c +++ b/cvsps.c @@ -1145,6 +1145,14 @@ static CvsFile * parse_rcs_file(const char * buff) } } + /* Windows CVS server may use two path separators: / for files + * and \ for subdirectories. */ + if (strncmp(fn, strip_path, strip_path_len-1) == 0 && + (fn[strip_path_len-1] == '\\' || + fn[strip_path_len-1] == '/')) { + goto ok; + } + /* FIXME: a subdirectory may have a different Repository path * than it's parent. we'll fail the above test since strip_path * is global for the entire checked out tree (recursively). -- cgit v1.2.1