diff --git a/res/values/strings.xml b/res/values/strings.xml
index 057e25e..3161be8 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -12,6 +12,7 @@
Path to check for new files:
Completed, ready to start another scan.
Scan failed: bad path specified for new file search.
+ Attention:\nThe path contains a hidden file named \".nomedia\", which prevents the system from scanning media.\nFor a successful scan, this file must be removed.
Preparing initial list of files...
Querying database...
Not yet started.
diff --git a/src/com/gmail/jerickson314/sdscanner/ScanFragment.java b/src/com/gmail/jerickson314/sdscanner/ScanFragment.java
index 335f415..b86a71c 100644
--- a/src/com/gmail/jerickson314/sdscanner/ScanFragment.java
+++ b/src/com/gmail/jerickson314/sdscanner/ScanFragment.java
@@ -226,11 +226,22 @@ public void startScan(File path, boolean restrictDbUpdate) {
updateProgressText(R.string.progress_filelist_label);
mFilesToProcess = new TreeSet();
resetDebugMessages();
+ int progMsg = -1;
if (path.exists()) {
- this.new PreprocessTask().execute(new ScanParameters(path, restrictDbUpdate));
+ File nomediaFile = new File(path.getPath(), ".nomedia");
+ if ( nomediaFile.exists() ) {
+ progMsg = R.string.progress_error_nomedia_in_root;
+ }
+ else {
+ this.new PreprocessTask().execute(new ScanParameters(path, restrictDbUpdate));
+ }
}
else {
- updateProgressText(R.string.progress_error_bad_path_label);
+ progMsg = R.string.progress_error_bad_path_label;
+ }
+
+ if (progMsg != -1) {
+ updateProgressText(progMsg);
updateStartButtonEnabled(true);
signalFinished();
}