Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2028

Separate path functions from URL functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • all
    • 1.7.0
    • libsvn_subr
    • None

    Description

      A number of svn_path functions are documented as accepting URLs in particular
      positions.  This practice can lead to trouble if a caller assumes without 
      checking that what it has is a path; for instance, if you
      svn_path_canonicalize() a URL and then pass it to svn_path_dirname(), what
      should happen if you reach the "http://hostname" part of the URL?
      
      In 2.0, we should have separate functions for operating on paths and URLs, and a
      third set for operating on "targets" which might be either (e.g.
      svn_target_is_url to distinguish between path targets and URL targets).  Then if
      you canonicalize a URL as a path, what you will get back is a canonicalized path
      (e.g. "http:/hostname/path"), not a URL, and the behavior of svn_path_dirname
      and friends are well-specified.
      

      Attachments

        Issue Links

          Activity

            People

              cmpilato C. Michael Pilato
              ghudson Greg Hudson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: