Open leihuayi opened 6 years ago
Thanks! Seems like a good idea. However, for cleanliness, I would prefer this to be taken care of in fileiterator.cpp
, before this line: https://github.com/dominikschnitzer/musly/blob/8003ea1/musly/fileiterator.cpp#L31
It should remove any number of trailing slashes. Would you want to amend your commit accordingly (i.e., do not add a second commit, overwrite the current one with git commit --amend
and then force-push)? Otherwise I can do it.
Done
Thanks! This implementation will fail if the string only consists of slashes, though. Could you please remove the if (!current_dir.empty())
check and add a current_dir.length() > 1
check to the while
condition? If we're down to /
, we want to keep it that way. Also it'd be nice if you could follow the code style of the remaining code (i.e., while (
instead of while(
, and the opening brace of the while
body on the same line as the while
condition).
Hello! Any news here? Will this PR be merged?
When using tab autocompletion for path/to/music/files, usually an extra "/" is added at the end, which corrupts the path of files in collection. I edited
main.cpp
in the action-a
to remove the extra "/" if it exists.