freebsd / portmaster

FreeBSD port management script without external databases or languages
77 stars 40 forks source link

--clean-distfiles cannot handle paths with spaces #75

Closed drossberg closed 1 year ago

drossberg commented 1 year ago

Recently, there are file paths in distfiles which contain spaces. They cause the following kind of errors when I try to clean them up:

       Deleting go/www_gohugo/pkg/mod/github.com/russross/blackfriday/v2@v2.1.0/testdata/Blockquotes

unlink: /usr/ports/distfiles/go/www_gohugo/pkg/mod/github.com/russross/blackfriday/v2@v2.1.0/testdata/Blockquotes: No such file or directory
       Deleting with

unlink: with: No such file or directory
       Deleting code

unlink: code: No such file or directory
       Deleting blocks.html

unlink: blocks.html: No such file or directory

The original file path in the example above is /usr/ports/distfiles/go/www_gohugo/pkg/mod/github.com/russross/blackfriday/ v2@v2.1.0/testdata/Blockquotes with code blocks.html.

The responsible code section seems to be https://github.com/freebsd/portmaster/blob/f273c9160333911ba1c7be3611a6cd34aefd3816/portmaster#L1308