spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
260 stars 57 forks source link

remove directory with weird mojibake encoding #183

Closed baldurmen closed 4 years ago

baldurmen commented 4 years ago

I don't know how that directory was created (and it's been there for a year already...) but suddently my Debian QA tools freaked out on this weirdly encoded thing...

oo@bar:~/git/supysonic/tests/assets$ ls -l
total 148
drwxr-xr-x 2 emiliano emiliano  4096 avr  1 22:51 ''$'\346'
-rw-r--r-- 1 emiliano emiliano    23 avr  1 22:51  23bytes
-rw-r--r-- 1 emiliano emiliano    33 avr  1 22:51  23bytes.txt
-rw-r--r-- 1 emiliano emiliano  6155 avr  1 22:51  cover.jpg
-rw-r--r-- 1 emiliano emiliano     0 avr  1 22:51  empty
drwxr-xr-x 2 emiliano emiliano  4096 avr  1 22:51  folder
drwxr-xr-x 2 emiliano emiliano  4096 avr  1 22:51  formats
-rw-r--r-- 1 emiliano emiliano  1955 avr  1 22:51  issue133.flac
-rw-r--r-- 1 emiliano emiliano  2760 avr  1 22:51  issue139.aac
-rw-r--r-- 1 emiliano emiliano 85812 avr  1 22:51  issue139.mp3
-rw-r--r-- 1 emiliano emiliano   229 avr  1 22:51  sample.ini
-rw-r--r-- 1 emiliano emiliano 24235 avr  1 22:51  subsonic-rest-api-1.9.0.xsd

Bash also showed the char as �/

baldurmen commented 4 years ago

FWIW, the commit that created that is 270fa9883b2f2bc98f1482a68f7d9022017af50b

codecov-io commented 4 years ago

Codecov Report

Merging #183 into master will decrease coverage by 0.06%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
- Coverage   88.35%   88.29%   -0.07%     
==========================================
  Files          33       33              
  Lines        3211     3211              
==========================================
- Hits         2837     2835       -2     
- Misses        374      376       +2     
Impacted Files Coverage Δ
supysonic/covers.py 83.54% <0.00%> (-2.54%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bee277...f7ecf08. Read the comment docs.

spl0k commented 4 years ago

This folder is here to test that the scanner doesn't bork with badly encoded paths (even if there is no specific test for this kind of issues). You got the wrong commit, see #85 and 954c75bc358916ebb53fdc689225f855ec773cde

Maybe a better approach would have been to create this folder during a test rather than versioning it 🤔

spl0k commented 4 years ago

It seems no test tries to scan this folder anymore, and that the error on badly encoded path reappeared 😮 This will be merged and (re)fixed in a few minutes.

baldurmen commented 4 years ago

Ah, thanks for the follow up. Makes sense. Turns out one of our QA tool broke and this helped find a bug :)

I do think generating that directory during the tests and cleaning it afterwards makes much more sense though, as a bunch of things don't like badly encoded paths.

pR0Ps commented 4 years ago

Thanks for merging this - it was causing me headaches when trying to develop on MacOS (Linux was fine)