Skip to content

SPDX output fails for scanned files with weird names #453

Description

@sschuberth

I'm scanning a file which has a colon (:) in its name, and when writing scan results to SPDX-TV, I get

  File "/home/jenkins/jobs/scancode/workspace/tools/scancode/src/scancode/cli.py", line 684, in save_results
    doc.package.verif_code = doc.package.calc_verif_code()
  File "/home/jenkins/jobs/scancode/workspace/tools/scancode/local/lib/python2.7/site-packages/spdx/package.py", line 195, in calc_verif_code
    hashes.append(file_entry.calc_chksum())
  File "/home/jenkins/jobs/scancode/workspace/tools/scancode/local/lib/python2.7/site-packages/spdx/file.py", line 151, in calc_chksum
    with open(self.name, 'rb') as file_handle:
IOError: [Errno 2] No such file or directory: u'data/response_24%3A00.xml'

I know @pombredanne has recently done an awesome work to fix issues with weird file names like this, and I know the colon is not supported on file name on e.g. Windows. However, I'm running the scan on Linux. Still, the file name seems to have the colon escaped as %3A.

My question to @pombredanne basically is: Is this on purpose, and am I supposed to unescape the file names in scanned_files before using them?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions