Skip to content

Commit

Permalink
Merge pull request #1016 from PhenoApps/v5_nomedia
Browse files Browse the repository at this point in the history
added .nomedia to trait and field data dirs
  • Loading branch information
trife authored Aug 3, 2024
2 parents 6ae8e98 + 9bdc303 commit 10514be
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ class DocumentTreeUtil: BaseDocumentTreeUtil() {
val plotDataDirName = context.getString(R.string.dir_plot_data)
val fieldDir = createDir(context, plotDataDirName, field)
if (fieldDir != null) {
val traitDir = fieldDir.findFile(traitName)
var traitDir = fieldDir.findFile(traitName)
if (traitDir == null || !traitDir.exists()) {
fieldDir.createDirectory(traitName)
}
return fieldDir.findFile(traitName)
traitDir = fieldDir.findFile(traitName)
if (traitDir != null && traitDir.findFile(".nomedia")?.exists() != true) {
traitDir.createFile("*/*", ".nomedia")
}
return traitDir
}
} else return null
}
Expand All @@ -67,11 +71,15 @@ class DocumentTreeUtil: BaseDocumentTreeUtil() {
val fieldDataDirName = context.getString(R.string.dir_field_data)
val fieldDir = createDir(context, fieldDataDirName, field)
if (fieldDir != null) {
val attributeDir = fieldDir.findFile(attributeName)
var attributeDir = fieldDir.findFile(attributeName)
if (attributeDir == null || !attributeDir.exists()) {
fieldDir.createDirectory(attributeName)
}
return fieldDir.findFile(attributeName)
attributeDir = fieldDir.findFile(attributeName)
if (attributeDir != null && attributeDir.findFile(".nomedia")?.exists() != true) {
attributeDir.createFile("*/*", ".nomedia")
}
return attributeDir
}
} else return null
}
Expand Down

0 comments on commit 10514be

Please sign in to comment.