#34 incorrect error message in workOnAccessRight.php (step 2)

closed-fixed
nobody
None
5
2012-09-28
2012-09-27
GlennGould
No

If a project is set to "/" of a repository and the repository has no subfolders inside, a missleading error is reported at step 2 (select folders) of the access-right-setting process.

The error_text from line 219 shows up ("Error while accessing svn repository..."), nevertheless there doesn't seem to be a real problem - the repository works and when continuing to step 3, one can set access rights without problems.

Problem seems to be, that with $CONF['accessControl'] set to 'dirs', $retval is from grep*, but with $CONF['accessControl'] set to 'files', it's from the "svn list" command - and the latter is, what the handling of $retval in line 213 and following assumes.

A possible fix could be, not to add the pipe to grep to $cmd to make sure $retval always origins from the "svn list" and extract entries with a trailing slash from $tRepodirs inside PHP..

Similar problem with $retval from different origins around line 439 of the same file, however it's silent here, because it's not evaluated (is this intentional :-))?

* and grep "/$" gives a non-zero exit code, if there's no match like for a repository without subdirectories leading to the else case in line 217 despite the fact that svn list _may_ have worked perfectly well.

Discussion

  • Thomas Krieger
    Thomas Krieger
    2012-09-27

    will be included in next release.

     
  • Thomas Krieger
    Thomas Krieger
    2012-09-27

    • status: open --> open-fixed
     
  • GlennGould
    GlennGould
    2012-09-28

    seems to be fixed - thank you!

     
  • Thomas Krieger
    Thomas Krieger
    2012-09-28

    • status: open-fixed --> closed-fixed