Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-337

Windows.pm delete_files_by_pattern may delete unintended files if an environment variable isn't defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2
    • vcld (backend)
    • None

    Description

      Windows.pm's delete_files_by_pattern() subroutine can delete unintended files if an environment variable is passed to it as the base directory argument and the environment variable isn't defined.

      Example:
      delete_files_by_pattern('$TEMP', '.')

      A trailing '/' is always added to the base directory path because find is called and it will fail if a wildcard pattern is used and the base directory doesn't contain a trailing slash. If $TEMP isn't defined on the computer, the subroutine will attempt to delete . from /.

      Attachments

        Activity

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: