[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tar --no-recursion patch
From: |
Don Mahurin |
Subject: |
Re: tar --no-recursion patch |
Date: |
Sun, 20 Apr 2003 21:43:20 -0700 |
User-agent: |
KMail/1.5.1 |
On Sunday 20 April 2003 09:00 pm, Paul Eggert wrote:
> Don Mahurin <address@hidden> writes:
>
> - && (path[p->length] == '\0' || ISSLASH (path[p->length]))
> + && (path[p->length] == '\0' || ISSLASH (path[p->length]) &&
> + (recursion_option || path[p->length + 1] == '\0'))
>
> Why is the "|| path[p->length + 1] == '\0'" needed? Wouldn't a simple
> "(path[p->length] == '\0' || (ISSLASH (path[p->length]) &&
> recursion_option))" suffice?
no, because for a directory, path is "dir/" and p->name is "dir".
with no-recursion, "path" matches "path" and "path/", but not "path/other"
without no-recursion, "path" matches "path" and "path/*"