pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.62k stars 410 forks source link

[F] Filename ".md" should be avoided #1813

Closed euneuber closed 4 years ago

euneuber commented 4 years ago

Thank you for this really helpful application!

I just had a little heart attack, because one of my notes has changed its file name to .md (hidden!) -- and I had to recover it by full text search my whole home directory :smile:

Expected behaviour

If the first line contains only char that will be dropped on creating a file name for the note -- please do not save to ".md"

Set the file name (and first line) to the current time stamp (e.g. 2020-07-02T21.53.55.md - time of program exit)

Actual behavior

If the note starts with

     //

the note will be saved under the file name .md

Steps to reproduce

  1. Create a note
  2. Change first line to " //"
  3. exit QOwnNotes

Relevant log output in the Log panel

Expand ``` ```

Information about the application, settings and environment

Expand QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Do. Juli 2 21:56:52 2020` **Version**: `20.6.11` **Build date**: `Jun 27 2020` **Build number**: `733` **Platform**: `linux` **Operating System**: `openSUSE Leap 15.1` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `OBS` **Qt Version (build)**: `5.9.7` **Qt Version (runtime)**: `5.9.7` **Portable mode**: `no` **Settings path / key**: `/home/eugen/.config/PBE/QOwnNotes.conf` **Application database path**: `/home/eugen/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite` **Application arguments**: `/usr/bin/QOwnNotes` **Qt Debug**: `0` **Locale (system)**: `de_DE` **Locale (interface)**: *empty* **Primary screen resolution**: `1920x1080` **Screen resolution(s)**: `1920x1080, 1920x1080` **Icon theme**: `breeze` **Notes in current note folder**: `45` **Calendar items**: `0` **Enabled scripts**: `0` ## Server Info **serverUrl**: `https://nextcloud.lin-serv.at` **appIsValid**: `yes` **notesPathExists**: `yes` **serverVersion**: `18.0.6.0` **appVersion**: *empty* ## Spellchecking **Enabled**: `true` **Selected language**: `auto` **Language codes**: `de_DE, en_US` **Language names**: `Deutsch (Deutschland), American English (United States)` **Application dictionaries path**: `/home/eugen/.local/share/PBE/QOwnNotes/dicts` ## Note folders **currentNoteFolderId**: `1` ### Note folder `Standard` **id**: `1` **isCurrent**: `yes` **activeTagId**: `-1` **localPath**: `/home/eugen/Dokumente/Notes` **remotePath**: `Notes` **cloudConnectionId**: `1` **isShowSubfolders**: `no` **isUseGit**: `yes` **activeNoteSubFolder name**: *empty* **database file**: `/home/eugen/Dokumente/Notes/notes.sqlite` ## Cloud connections ### Cloud connection `Default` **id**: `1` **isCurrent**: `yes` **serverUrl**: `https://nextcloud.lin-serv.at` **username**: `eugen` ## Enabled scripts ## Settings **AboutDialog/geometry** (QByteArray): `` **ActiveNoteHistoryItem** (NoteHistoryItem): `` **Debug/fakeOldVersionNumber** (bool): `false` **Debug/fileLogging** (bool): `false` **DistractionFreeMode/isEnabled** (QString): `false` **DistractionFreeMode/menuBarGeometry** (QByteArray): `` **DistractionFreeMode/menuBarHeight** (QString): `30` **DistractionFreeMode/menuBarVisible** (QString): `true` **DistractionFreeMode/windowState** (QByteArray): `` **Editor/CurrentSchemaKey** (QString): `EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb` **Editor/autoBracketClosing** (bool): `true` **Editor/autoBracketRemoval** (bool): `true` **Editor/centerCursor** (QString): `false` **Editor/disableCursorBlinking** (bool): `false` **Editor/editorWidthInDFMOnly** (bool): `true` **Editor/highlightCurrentLine** (bool): `true` **Editor/indentSize** (int): `4` **Editor/removeTrainingSpaces** (bool): `false` **Editor/useTabIndent** (bool): `false` **Editor/vimMode** (bool): `false` **IssueAssistantDialog/geometry** (QByteArray): `` **LastUpdateCheck** (QDateTime): `2020-07-02T21:15:45` **LocalTrashDialog/geometry** (QByteArray): `` **LogWidget/criticalLog** (bool): `true` **LogWidget/debugLog** (bool): `true` **LogWidget/fatalLog** (bool): `true` **LogWidget/infoLog** (bool): `true` **LogWidget/scriptingLog** (bool): `true` **LogWidget/statusLog** (bool): `true` **LogWidget/warningLog** (bool): `true` **MainWindow/geometry** (QByteArray): `` **MainWindow/mainToolBar.iconSize** (int): `22` **MainWindow/menuBarGeometry** (QByteArray): `` **MainWindow/noteTextEdit.code.font** (QString): `Hack,9,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextEdit.font** (QString): `Noto Sans,10,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextView.code.font** (QString): `Hack,9,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextView.font** (QString): `Noto Sans,10,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextView.ignoreCodeFontSize** (bool): `true` **MainWindow/noteTextView.rtl** (bool): `false` **MainWindow/noteTextView.underline** (bool): `true` **MainWindow/noteTextView.useEditorStyles** (bool): `true` **MainWindow/noteTextView.useInternalExportStyling** (bool): `true` **MainWindow/showNotesFromAllNoteSubFolders** (bool): `true` **NoteDiffDialog/geometry** (QByteArray): `` **NoteFolder-1/NoteTabNameList** (QStringList): `scratchpad, TODO` **NoteFolder-1/NoteTabStickinessList** (QStringList): *empty* **NoteFolder-1/NoteTabSubFolderPathDataList** (QStringList): `, ` **NoteFolder-1/allowDifferentNoteFileName** (QString): `false` **NoteHistory-1** (QVariantList): `` **NoteHistoryCurrentIndex-1** (int): `103` **PiwikClientId** (QString): `` **SearchEngineId** (int): `8` **SettingsDialog/geometry** (QByteArray): `` **SettingsDialog/mainSplitterState** (QByteArray): `` **ShowSystemTray** (bool): `false` **StartHidden** (bool): `false` **TodoDialog/geometry** (QByteArray): `` **TodoDialog/mainSplitterState** (QByteArray): `` **TodoDialog/showCompletedItems** (QString): `0` **TodoDialog/todoListSelectorSelectedItem** (QString): `Persönlich` **UpdateDialog/geometry** (QByteArray): `` **WelcomeDialog/geometry** (QByteArray): `` **acceptAllExternalModifications** (bool): `false` **allowNoteEditing** (bool): `true` **allowOnlyOneAppInstance** (bool): `true` **appMetrics/disableAppHeartbeat** (bool): `true` **appMetrics/disableTracking** (bool): `false` **appMetrics/notificationShown** (QString): `true` **automaticNoteFolderDatabaseClosing** (bool): `false` **checkSpelling** (bool): `true` **closeTodoListAfterSave** (bool): `false` **cryptoKey** (QString): `` **currentNoteFolderId** (QString): `1` **currentWorkspace** (QString): `29885980-c5f1-4425-82bc-88d2d342fd25` **cursorWidth** (int): `1` **customNoteFileExtensionList** (QStringList): *empty* **darkMode** (bool): `false` **darkModeColors** (bool): `false` **darkModeIconTheme** (bool): `false` **darkModeTrayIcon** (bool): `false` **defaultNoteFileExtension** (QString): `md` **demoNotesCreated** (QString): `true` **disableAutomaticUpdateDialog** (bool): `true` **disableSavedSearchesAutoCompletion** (bool): `false` **dockWasInitializedOnce** (QString): `true` **enableNoteTree** (bool): `false` **enableSocketServer** (bool): `true` **externalEditorPath** (QString): *empty* **fullyHighlightedBlockquotes** (bool): `true` **gitCommitInterval** (int): `30` **gitExecutablePath** (QString): *empty* **gitLogCommand** (QString): *empty* **guiFirstRunInit** (bool): `true` **ignoreAllExternalModifications** (bool): `false` **ignoreAllExternalNoteFolderChanges** (bool): `false` **ignoreNoteSubFolders** (QString): `^\.` **imageScaleDown** (bool): `false` **imageScaleDownMaximumHeight** (int): `1024` **imageScaleDownMaximumWidth** (int): `1024` **insertTimeFormat** (QString): *empty* **interfaceFontSize** (int): `11` **interfaceLanguage** (QString): *empty* **internalIconTheme** (bool): `false` **itemHeight** (int): `24` **legacyLinking** (bool): `false` **localTrash/autoCleanupDays** (int): `30` **localTrash/autoCleanupEnabled** (bool): `true` **localTrash/supportEnabled** (bool): `true` **localTrashSplitterSizes** (QByteArray): `` **markdownHighlightingEnabled** (bool): `true` **navigationPanelHideSearch** (bool): `false` **networking/ignoreSSLErrors** (bool): `false` **networking/proxyType** (int): `2` **newNoteAskHeadline** (bool): `false` **noteEditIsCentralWidget** (bool): `true` **noteListPreview** (bool): `false` **noteSaveIntervalTime** (int): `10` **noteSubfoldersPanelDisplayAsFullTree** (bool): `true` **noteSubfoldersPanelHideSearch** (bool): `false` **noteSubfoldersPanelOrder** (int): `0` **noteSubfoldersPanelShowFullPath** (bool): `false` **noteSubfoldersPanelShowNotesRecursively** (bool): `false` **noteSubfoldersPanelShowRootFolderName** (bool): `true` **noteSubfoldersPanelSort** (int): `0` **notesPanelOrder** (int): `0` **notesPanelSort** (int): `1` **notesPath** (QString): `/home/eugen/Dokumente/Notes` **notifyAllExternalModifications** (bool): `false` **overrideInterfaceFontSize** (bool): `false` **ownCloud/supportEnabled** (bool): `true` **ownCloud/todoCalendarBackend** (int): `3` **ownCloud/todoCalendarCalDAVPassword** (QString): `` **ownCloud/todoCalendarCalDAVServerUrl** (QString): *empty* **ownCloud/todoCalendarCalDAVUsername** (QString): *empty* **ownCloud/todoCalendarCloudConnectionId** (int): `1` **ownCloud/todoCalendarDisplayNameList** (QStringList): *empty* **ownCloud/todoCalendarEnabledList** (QStringList): *empty* **ownCloud/todoCalendarEnabledUrlList** (QStringList): *empty* **ownCloud/todoCalendarUrlList** (QStringList): *empty* **ownCloudInfo/appIsValid** (bool): `true` **ownCloudInfo/connectionErrorMessage** (QString): `Unbekannter Fehler` **ownCloudInfo/notesPathExistsText** (QString): `yes` **ownCloudInfo/serverVersion** (QString): `18.0.6.0` **previousWorkspace** (QString): `2d4fc7ba-b1ca-4261-9145-57db5e6cffbc` **recentNoteFolders** (QString): `/home/eugen/Nextcloud/Notes` **restoreCursorPosition** (bool): `true` **restoreLastNoteAtStartup** (bool): `true` **restoreNoteTabs** (bool): `true` **savedSearches/noteFolder-1** (QStringList): `TODO, Note 2020-06-01T19.07.06, Note 2020-03-31T09.07.12, Note 2020-03-28T11.44.17, Note 2020-03-19T08.14.04, Note 2020-03-15T16.47.46, Note 2020-02-27T20.43.59, Note 2020-02-13T08.23.47, Note 2020-02-07T10.57.32, Note 2020-02-06T12.18.45, Note 2020-02-01T20.52.07, Note 2020-01-31T07.29.52, Note 2020-01-15T22.09.29, Note 2020-01-15T21.38.04, Note 2020-01-11T18.24.32, Note 2020-01-08T18.10.11, Note 2020-01-02T08.02.46, Note 2019-12-22T18.13.12, Note 2019-12-13T17.06.12, Note 2019-12-03T07.26.17, Note 2019-11-25T10.45.23, Note 2019-11-13T21.45.30, Note 2019-11-10T15.26.36, Note 2019-11-06T22.10.16, Gries-Journal-2019-11, Note 2019-09-25T20.56.02, Note 2019-05-20T11.02.19, Servitutsverletzung-2019, Note 2019-01-28T13.18.41, Browser Tabs, GDPR presentation for GrazPHP MeetUp, Vorhersagen für Heise.de für 2019, Note 2019-01-13T15.33.40, beispiel` **showMatches** (bool): `true` **showMenuBar** (bool): `true` **showStatusBar** (bool): `true` **spellCheckLanguage** (QString): `auto` **systemIconTheme** (bool): `false` **taggingShowNotesRecursively** (bool): `false` **tagsPanelHideSearch** (bool): `false` **tagsPanelOrder** (int): `0` **tagsPanelSort** (int): `0` **todoCalendarSupport** (bool): `true` **toolbar/1/items** (QStringList): `action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionOpen_List` **toolbar/1/name** (QString): `mainToolBar` **toolbar/1/title** (QString): `Hauptsymbolleiste` **toolbar/2/items** (QStringList): `actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote` **toolbar/2/name** (QString): `formattingToolbar` **toolbar/2/title** (QString): `Formatierungs-Werkzeugleiste` **toolbar/3/items** (QStringList): `actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time` **toolbar/3/name** (QString): `insertingToolbar` **toolbar/3/title** (QString): `Einfügen-Werkzeugleiste` **toolbar/4/items** (QStringList): `action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note` **toolbar/4/name** (QString): `encryptionToolbar` **toolbar/4/title** (QString): `Verschlüsselung-Werkzeugleiste` **toolbar/5/items** (QStringList): `actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size` **toolbar/5/name** (QString): `windowToolbar` **toolbar/5/title** (QString): `Fenster-Werkzeugleiste` **toolbar/6/items** (QStringList): `action_Quit` **toolbar/6/name** (QString): `quitToolbar` **toolbar/6/title** (QString): `Beenden - Symbolleiste` **toolbar/size** (int): `6` **useNoteFolderButtons** (bool): `false` **useUNIXNewline** (bool): `false` **webSocketServerService/bookmarksNoteName** (QString): `Bookmarks` **webSocketServerService/bookmarksTag** (QString): `bookmarks` **webSocketServerService/port** (int): `22222` **webSocketServerService/token** (QString): `VUKTyXUc` **workspace-29885980-c5f1-4425-82bc-88d2d342fd25/name** (QString): `Vollständig` **workspace-29885980-c5f1-4425-82bc-88d2d342fd25/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-29885980-c5f1-4425-82bc-88d2d342fd25/windowState** (QByteArray): `` **workspace-2d4fc7ba-b1ca-4261-9145-57db5e6cffbc/name** (QString): `Minimal` **workspace-2d4fc7ba-b1ca-4261-9145-57db5e6cffbc/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-2d4fc7ba-b1ca-4261-9145-57db5e6cffbc/windowState** (QByteArray): `` **workspaces** (QStringList): `29885980-c5f1-4425-82bc-88d2d342fd25, 2d4fc7ba-b1ca-4261-9145-57db5e6cffbc` ## System environment **GS_LIB**: `/home/eugen/.fonts` **KDE_FULL_SESSION**: `true` **HOSTTYPE**: `x86_64` **XAUTHLOCALHOSTNAME**: `linux-xg80.suse` **LESSCLOSE**: `lessclose.sh %s %s` **XKEYSYMDB**: `/usr/X11R6/lib/X11/XKeysymDB` **LANG**: `de_DE.UTF-8` **WINDOWMANAGER**: `/usr/bin/startkde` **LESS**: `-M -I -R` **DISPLAY**: `:0` **JAVA_ROOT**: `/usr/lib64/jvm/jre-1.8.0-openjdk` **HOSTNAME**: `linux-xg80.suse` **OLDPWD**: `/home/eugen` **CONFIG_SITE**: `/usr/share/site/x86_64-unknown-linux-gnu` **CSHEDIT**: `emacs` **AUDIODRIVER**: `pulseaudio` **LESS_ADVANCED_PREPROCESSOR**: `no` **COLORTERM**: `1` **JAVA_HOME**: `/usr/lib64/jvm/jre-1.8.0-openjdk` **ALSA_CONFIG_PATH**: `/etc/alsa-pulse.conf` **MACHTYPE**: `x86_64-suse-linux` **XDG_VTNR**: `7` **QEMU_AUDIO_DRV**: `pa` **SSH_AUTH_SOCK**: `/tmp/ssh-8uxFaAQNN7R0/agent.2702` **MINICOM**: `-c on` **QT_SYSTEM_DIR**: `/usr/share/desktop-data` **OSTYPE**: `linux` **XDG_SESSION_ID**: `2` **USER**: `eugen` **PAGER**: `less` **DESKTOP_SESSION**: `/usr/share/xsessions/xsession` **MORE**: `-sl` **PWD**: `/home/eugen` **SSH_ASKPASS**: `/usr/lib/ssh/ssh-askpass` **HOME**: `/home/eugen` **LC_CTYPE**: `de_DE.UTF-8` **SSH_AGENT_PID**: `2934` **HOST**: `linux-xg80.suse` **XCURSOR_SIZE**: `24` **XNLSPATH**: `/usr/share/X11/nls` **XDG_SESSION_TYPE**: `x11` **XDG_DATA_DIRS**: `/home/eugen/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share` **XDG_SESSION_DESKTOP**: *empty* **NNTPSERVER**: `news` **PROFILEREAD**: `true` **GTK_MODULES**: `canberra-gtk-module` **FROM_HEADER**: *empty* **MAIL**: `/var/spool/mail/eugen` **LESSKEY**: `/etc/lesskey.bin` **SHELL**: `/usr/bin/zsh` **TERM**: `xterm` **XDG_SESSION_CLASS**: `user` **XDG_SEAT_PATH**: `/org/freedesktop/DisplayManager/Seat0` **QT_IM_MODULE**: `xim` **XMODIFIERS**: `@im=local` **XCURSOR_THEME**: `breeze_cursors` **XDG_CURRENT_DESKTOP**: `KDE` **XDG_SEAT**: `seat0` **SHLVL**: `1` **LANGUAGE**: `de:en_US` **G_FILENAME_ENCODING**: `@locale,UTF-8,ISO-8859-15,CP1252` **MANPATH**: `/usr/local/man:/usr/local/share/man:/usr/share/man` **XSESSION_IS_UP**: `yes` **LOGNAME**: `eugen` **DBUS_SESSION_BUS_ADDRESS**: `unix:path=/run/user/1000/bus` **XDG_RUNTIME_DIR**: `/run/user/1000` **XAUTHORITY**: `/home/eugen/.Xauthority` **JRE_HOME**: `/usr/lib64/jvm/jre` **XDG_SESSION_PATH**: `/org/freedesktop/DisplayManager/Session1` **QT_AUTO_SCREEN_SCALE_FACTOR**: `0` **XDG_CONFIG_DIRS**: `/etc/xdg` **PATH**: `/home/eugen/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/sbin` **JAVA_BINDIR**: `/usr/lib64/jvm/jre-1.8.0-openjdk/bin` **KDE_SESSION_UID**: `1000` **KDE_SESSION_VERSION**: `5` **SDL_AUDIODRIVER**: `pulse` **G_BROKEN_FILENAMES**: `1` **QT_IM_SWITCHER**: `imsw-multi` **HISTSIZE**: `1000` **CPU**: `x86_64` **CVS_RSH**: `ssh` **LESSOPEN**: `lessopen.sh %s` **GTK_IM_MODULE**: `cedilla` **_**: `/usr/bin/kwrapper5` **SESSION_MANAGER**: `local/linux-xg80.suse:@/tmp/.ICE-unix/2995,unix/linux-xg80.suse:/tmp/.ICE-unix/2995`
pbek commented 4 years ago

Thank you for your suggestion. Never saw that in the wild before before I tried your first line. :grin:

pbek commented 4 years ago

20.7.1

pbek commented 4 years ago

There now is a new release, could you please test it and report if it works for you?

euneuber commented 4 years ago

Works perfectly! A big THANK YOU for your ultra fast response! :+1:

pbek commented 4 years ago

Great, thank you for testing! :grin: