X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fcvsutil;h=72c19d5624a4b358ed523bcd99e5124757c60d92;hp=26b49a9c5bedd32ba0026f132f3431ed5dc614a5;hb=257109ce5b17e8bf1e9990564d3eef7722746c0b;hpb=168e0bb3dfaa5cb9883826c7a135a42a92a44730 diff --git a/bin/cvsutil b/bin/cvsutil index 26b49a9..72c19d5 100755 --- a/bin/cvsutil +++ b/bin/cvsutil @@ -18,8 +18,8 @@ use Cwd qw(chdir fastgetcwd); use Errno qw(ENOENT); use Carp qw(confess cluck croak carp); BEGIN { - if (!eval q{use File::Remove qw(remove);}) {{ - sub main::remove + if (!eval q{ use File::Remove qw(remove); 1; }) {{ + sub main::remove(@) { my $r=""; if ("SCALAR" eq ref $_[0]) { @@ -167,7 +167,8 @@ sub localreaddir next if /^D$/; do { push @dir_dirs ,$1; next; } if m#^D/([^/]*)/#; next if m#^/[^/]*/-#; # deleted file: /filename/-1.1/dummy timestamp// - next if m#^/[^/]*/0/#; # new file: /filename/0/dummy timestamp// + # New file is a valid entry! + # next if m#^/[^/]*/0/#; # new file: /filename/0/dummy timestamp// do { push @dir_files,$1; next; } if m#^/([^/]*)/# ; mayfatal "File ".ENTRIES." contains invalid line \"$_\"",("noerrno"=>1); } @@ -221,7 +222,8 @@ sub localactionrm { my($filename)=@_; - chmod 0600,$filename or do { + # &chmod follows the symlinks. + -l $filename or chmod 0700,$filename or do { mayfatal "File \"$_\" cannot be chmod(2)ed" if !$!{ENOENT}; }; # '\1' for '-r':