Tags.json File Continually Corrupts

37 views
Skip to first unread message

Paul Sorauer

unread,
Jul 23, 2025, 5:50:04 PMJul 23
to OneCommander
Hi there

Firstly, I love OneCommander. It's by far the best file management software I've ever used.

However, I'm fairly frustrated with the way that Tags are not working properly. I use tags A LOT, to help organise my files and folders. Recently I've found that my tags have started to just disappear - this has been happening for probably a couple of months - can't pinpoint when it started, sorry.

I used to just manually restore the tags.json file from a recent backup, but of course that means that some tag history is lost.

An investigation has highlighted two discoveries.

1. OC seems to have previously automated the backup of the tags.json file but appears to no longer be performing this action. I cannot find anything in settings that would indicate a switch for this behaviour and OC hasn't made any backups of the tags.json file in quite some time.

2.  I used to think I had hit some hard limit in terms of how many tags could be stored. I had several thousand. I thought that the tags.json file was getting corrupted with a count limitation as it seemed to be occurring around line 2180 something. But I then used Excel and some VBA to check that all files and folders referenced were still current and I manually removed about 1,000 entries. The issue still occurs.

Currently I have 1094 entries but the corruption happened yet again today as I added a single tag. I've failed to keep a copy, but something happens where OC does not write the full JSON back to disk, and the file is simply truncated halfway through an entry. That means that the last entry is malformed, there is no terminating curly bracket, and when OC or the computer are restarted OC can't read the file and none of the tags appear. I have not yet worked out how many entries are being lost when the file is truncated.

I have also noticed, anecdotally, that when the tags are lost and not displayed in the UI, about 50% of the time the tag.json file is simply no longer on disk at all. Just gone.

Would you please look at what's going on with the tags? From the outside if feels like there's some error occurring, it's not being caught or processed by error handling properly, and the routine just drops.

I'm also keen to understand how to get OC to automate (again) the creation of backups of the tags.json file.

I'll try to capture more information / examples, in the future.

Thanks,

Paul

Mark Palmos

unread,
Jul 25, 2025, 11:52:57 AMJul 25
to OneCommander
Hi Paul, 
What do you mean by Tags? I looked in the manual and there is no info about Tags that comes up in a search for Tags.
Do you mean the coloured dots one can apply to files and folders?
tx
Mark

OneCommander Support

unread,
Jul 25, 2025, 12:03:39 PMJul 25
to OneCommander
OC loads Tags on start, and if loading fails it will disable using the tags for that session. 
Each time you add or remove a tag from a file it resaves the file.

If you can reproduce the issue then it might be easy to find the cause.  

Try opening Tags.json in some text editor
Check the end of the file that it has } at the end (and last file without , at the end of the line

{
  "C:\\Users\\milos\\Videos\\2022-12-15 13-58-32.mkv": 1,
...
  "C:\\Users\\milos\\Videos\\2022-12-15 13-56-34.mkv": 1
}

So once you restore a backup, try adding a tag to a new file
Right-click OC in system tray and view logs, see at the end of the log if there is an error logged. 

Fully close OC (hold ctrl while clicking close button) and open it again
If I understand that it fails now to load it, open the log again and see what the error is, and please also open the tags.json and check if file is closed

The only things that come to my mind now that might be causing this is that OC settings file is in some cloud folder and that cloud software partially synchs it. Another thing, is something in the path of the tagged path that is corrupting the json file. Those logs and opening files might give some clues. 


OneCommander Support

unread,
Jul 25, 2025, 12:05:27 PMJul 25
to OneCommander
Mark, Tags are the color circles you can add on files through right-click menu (see list of colors on top). Manual is not up to date. Once the v4 is released I will start updating the help.
Reply all
Reply to author
Forward
0 new messages