Add to Library: 'Path is already in your collection' logic incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Exaile |
Fix Released
|
Medium
|
Johannes Sasongko |
Bug Description
The logic that checks whether a path you are about to add is already in your collection seems to be incorrect.
Let's say you have /home/me/music and /home/me/
Off the top of my head the quickest fix would be to check for path == newPath && newPath.
That would possibly introduce an issue if '/' was in your library, since nothing would start with '//' and could thus be entered multiple times.
Changed in exaile: | |
importance: | Undecided → Medium |
milestone: | none → 0.2.14 |
status: | New → Confirmed |
Changed in exaile: | |
status: | In Progress → Fix Committed |
Changed in exaile: | |
status: | Fix Committed → Fix Released |
So my quickfix seems to work, at least in the naive sense. Basically I've changed those if statements to look like the following:
/xl/gui/Library.py /').startswith( item+'/ '): /').startswith( path+'/ '):
--
144 if (path+'
<snip>
150 elif (item+'
--
Haven't looked at the '/' thing, would presume it would fail (i.e. let you have '/' and '/home' in your library).