Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lua/neorg/modules/core/journal/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ module.public = {
end

if mtype == "directory" then
-- Check if the folder name is a valid month (01-12)
local month_number = tonumber(mname)
if not month_number or month_number < 1 or month_number > 12 then
log.debug("Skipping folder (not a valid month): " .. mname)
goto continue -- Skip this folder if it's not a valid month
end

local months_handle = get_fs_handle(name .. config.pathsep .. mname)
while true do
-- dname is the day
Expand Down Expand Up @@ -322,6 +329,7 @@ module.public = {
end)
end
end
::continue:: -- Label for skipping folders
end
end
end
Expand Down