Skip to content

Commit

Permalink
deleting thumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawkush committed Nov 14, 2018
1 parent 713073e commit e49e5d7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,24 @@ private void delete(ArrayList<String> list){
File[] files = dir.listFiles();
Log.d("test", "onStart: " + files.length);
Arrays.sort(files, LastModifiedFileComparator.LASTMODIFIED_REVERSE);
/* for (File file: files) {
for (File file: files) {
if(list.contains(file.getName())){
deleteFile(file);
list.remove(file.getName());
}
}*/

for (File file: files) {
if (list.remove(file.getName())) {
deleteFile(file);
file.delete();

if (file.exists()) {
try {
file.getCanonicalFile().delete();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (file.exists()) {
getContext().deleteFile(file.getName());
}

}

}
}
}

Expand All @@ -182,10 +190,6 @@ private void delete(ArrayList<String> list){

}

private void deleteFile(File file) {


}


private void deleteUnusedThumbs(ArrayList<DataModel> mylist){
Expand Down

0 comments on commit e49e5d7

Please sign in to comment.