1 parent 0daa941 commit 2deab27Copy full SHA for 2deab27
1 file changed
src/rovr/functions/path.py
@@ -564,7 +564,11 @@ def get_mime_type(
564
if ignore is None:
565
ignore = ()
566
567
- file_extension = path.splitext(file_path)[1].lower()
+ base = path.basename(file_path)
568
+ if base.startswith("."):
569
+ file_extension = base[1:]
570
+ else:
571
+ file_extension = "".join(base.split(".")[1:]).lower()
572
573
# Read file bytes once, reuse for both puremagic and basic detection
574
try:
0 commit comments