kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
111 stars 28 forks source link

On Android, duplicates in storage list #326

Closed kelson42 closed 7 years ago

kelson42 commented 7 years ago

"Settings" > "Storage" display many entries (odd)

  1. 3.8
  2. 3.78
  3. 3.8
  4. 53.7

The first 3 ones are duplicates, I can reproduce the problem on my device. I guess this because a storage device has many mounting points!

An relatively smart should be able to identify the duplicates based on the the content of the directory.

mhutti1 commented 7 years ago

mhutti1/android-storage-devices@0f5b308

Should have fixed

kelson42 commented 7 years ago

@mhutti1 Something seems still to be buggy. I have now 3 entries: 1 - 4.99GB 2 - 5.01GB 3 - 134.01GB

mhutti1 commented 7 years ago

I think this is fixed in the majority of cases but there may be one or two that have slipped through the cracks. Implementing a simple check to validate non duplicate zim id's should fix this.

mhutti1 commented 7 years ago

After some though the best/only practical way I can think of solving this is to create a file in each location with a location ID. Two locations are unique if they have no file in any of their parent hierarchy with the same ID.

kelson42 commented 7 years ago

@mhutti1 What is a LocationID?

mhutti1 commented 7 years ago

@kelson42 an arbitrary random number.

kelson42 commented 7 years ago

@mhutti1 Not sure to fully understand what you mean... but looks like you know what you are doing ;)

mhutti1 commented 7 years ago

@kelson42 This should be fixed now. The only time there should be duplicates is if one is private storage and in this case we tell the user this.

kelson42 commented 7 years ago

OK, then let see users feedbacks :) THX