diff --git a/app/src/main/java/net/gsantner/markor/activity/DocumentEditAndViewFragment.java b/app/src/main/java/net/gsantner/markor/activity/DocumentEditAndViewFragment.java index ba88eff0b..3182b4ee8 100644 --- a/app/src/main/java/net/gsantner/markor/activity/DocumentEditAndViewFragment.java +++ b/app/src/main/java/net/gsantner/markor/activity/DocumentEditAndViewFragment.java @@ -813,6 +813,11 @@ public boolean saveDocument(final boolean forceSaveEmpty) { // Document is written iff writeable && content has changed final CharSequence text = _hlEditor.getText(); if (!_document.isContentSame(text)) { + // Touch parent folder on edit + File current_parent_folder = _document.file.getAbsoluteFile().getParentFile(); + long currentTime = System.currentTimeMillis(); + current_parent_folder.setLastModified(currentTime); + final int minLength = GsContextUtils.TEXTFILE_OVERWRITE_MIN_TEXT_LENGTH; if (!forceSaveEmpty && text != null && text.length() < minLength) { final String message = activity.getString(R.string.wont_save_min_length, minLength);