Create folder if config ends with (back)slash (#1492)

* Check config if FolderJournal and treat as so

* Add test for end of path is slash

* Code format correction

* Requested changes PR 1482

* Add info to doc about path of folder.

* Small addition to doc about folder journal
This commit is contained in:
Jonathan van der Steege 2022-06-04 22:20:51 +02:00 committed by GitHub
parent 1c35c6951d
commit e758986985
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 3 deletions

View file

@ -28,9 +28,10 @@ you have an entry on May 5th, 2021 in a folder journal at `~/folderjournal`, it
be located in: `~/folderjournal/2021/05/05.txt`
!!! note
When creating a new folder journal, you will need to create the folder before running
`jrnl`. Otherwise, when you run `jrnl` for the first time, it will assume that you
are creating a single file journal instead, and it will create a file at that path.
Creating a new folder journal can be done in two ways:
* Create a folder with the name of the journal before running `jrnl`. Otherwise, when you run `jrnl` for the first time, it will assume that you are creating a single file journal instead, and it will create a file at that path.
* Create a new journal in your [config_file](advanced.md) and end the path with a ``/`` (on a POSIX system like Linux or MacOSX) or a ``\`` (on a Windows system). The folder will be created automatically if it doesn't exist.
!!! note
Folder journals can't be encrypted.