Bug allows MKV files with leading period or dot

The place to discuss Mac OS X version of MakeMKV
Post Reply
editman21
Posts: 1
Joined: Tue Jul 16, 2024 12:02 am

Bug allows MKV files with leading period or dot

Post by editman21 » Tue Jul 16, 2024 12:11 am

Can't something be added to the code to prevent MakeMKV from creating files with illegal/reserved characters??
MacOS will not display files named with a period as the first character. Despite this fact, if a disc is authored with a period or a blank as the disc name, MakeMKV will create MKV files named "._t01.mkv" etc, leading to no visible files in MacOS when the rip is complete.
Before you say it...NO, using cmd>shift>period will not show these particular "hidden" files. If anyone out there has a copy of "Fight Club" 10th Anniversary Edition Blu-Ray, you can test this out. Happens every time. I have to open the drive in Windows in Parallels to re-name the files so they can be seen/used on the Mac.

Woodstock
Posts: 10311
Joined: Sun Jul 24, 2011 11:21 pm

Re: Bug allows MKV files with leading period or dot

Post by Woodstock » Tue Jul 16, 2024 2:38 am

What do you have for your Preferences->Advanced->Output file name template setting?

Personally, I've never seen MakeMKV try to set a file name as "just" a period. Mine is set to:

Code: Select all

{NAME1}{-:CMNT1}{-:DT}{title:+DFLT}{_t:N2}
Which I thought was stock. I just put in a disk with no name for the tracks (DVD) and it came up with "title_t01.mkv" as its default. The Bluray version comes up with "MHA WorldHeroesMission_t00.mkv" as the default file name.

dcoke22
Posts: 3052
Joined: Wed Jul 22, 2020 11:25 pm

Re: Bug allows MKV files with leading period or dot

Post by dcoke22 » Tue Jul 16, 2024 1:00 pm

Like Woodstock, I don't think I've ever had MakeMKV produce a file with a leading period in the filename.

However, when I create a file named:

Code: Select all

._t01.mkv
It is indeed invisible in macOS Finder and the Command + Shift + . keyboard shortcut doesn't display it. Nor does it display the .DS_Store files that are in some directories either.

But if I create a normal file in Finder, then rename the file with a leading period in Finder, it gives me a warning dialog but then the invisible file appears and disappears with Command + Shift + . keyboard shortcut.
I am continually impressed by the efforts Apple Engineers put forth to hide the very powerful Unix that forms the foundation of macOS.

In all cases, the file is visible with the proper command in Terminal. The minimum command necessary to see hidden files in Terminal is 'ls -a' although I prefer:

Code: Select all

ls -lah
It will produce output that looks like this:

Code: Select all

% ls -lah
total 243488
drwxr-xr-x   5 weaverm  staff   160B Jul 16 07:45 .
drwxr-xr-x  11 weaverm  staff   352B Jul 16 07:43 ..
-rw-r--r--   1 weaverm  staff     0B Jul 16 07:26 ._t01.mkv
-rw-r--r--   1 weaverm  staff    59M Dec 12  2023 .test copy.mkv
-rw-r--r--   1 weaverm  staff    59M Dec 12  2023 test.mkv
% 
The command mv will rename a file. The first argument is the existing filename and the second argument is the new filename.

Code: Select all

% mv ._t01.mkv atitle._t01.mkv
% ls -lah
total 243488
drwxr-xr-x   5 weaverm  staff   160B Jul 16 07:53 .
drwxr-xr-x  11 weaverm  staff   352B Jul 16 07:43 ..
-rw-r--r--   1 weaverm  staff    59M Dec 12  2023 .test copy.mkv
-rw-r--r--   1 weaverm  staff     0B Jul 16 07:26 atitle._t01.mkv
-rw-r--r--   1 weaverm  staff    59M Dec 12  2023 test.mkv
% 
With a bit of effort in Terminal, you can find and rename any invisible files that accidentally get produced.

jfoughe
Posts: 9
Joined: Sun Jul 10, 2022 9:33 pm

Re: Bug allows MKV files with leading period or dot

Post by jfoughe » Tue Jul 23, 2024 9:44 pm

In my many, many rips I've only ever seen this once. For the life of me I can't remember what disc it was. Same issue as you describe: the resulting mkv file was hidden due to a period in the beginning of the filename. The Command + Shift + . shortcut would not show the file either. I ultimately renamed the file in Terminal, after which I could see it in Finder.

EDIT: did some digging and the mv command in Terminal was in my history. The Fight Club Blu-Ray produced the file "._t00.mkv"

dcoke22
Posts: 3052
Joined: Wed Jul 22, 2020 11:25 pm

Re: Bug allows MKV files with leading period or dot

Post by dcoke22 » Thu Jul 25, 2024 8:39 pm

Well, the first rule of Fight Club is you don't talk about Fight Club. I suppose rule 1A is you don't show the filename on the rips. :)

Post Reply