Bug 418228 - Python files temporarily taken as matlab files
Summary: Python files temporarily taken as matlab files
Status: RESOLVED UPSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL: https://gitlab.freedesktop.org/xdg/sh...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-26 17:09 UTC by David
Modified: 2020-02-27 17:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2020-02-26 17:09:47 UTC
Steps to reproduce:
- Create some valid python (.py) file.
- Edit the file so that it would start with commented lines having 3 (three) "#" symbols.
- Edit some line so that it would contain a decimal number with exponential notation (e.g. 1e1).
- Inspect the folder in which the file is located with Dolphin, without pressing F5.

Expected behavior: should recognize the file as a python file.

Actual behavior: takes the file as a matlab file, until refreshing, after which it becomes a python file, but upon editing it again will become matlab once more, and will again become python upon next refresh.

Example:
### Some comment
### Another comment
### More comments

import numpy as np

n = int(1e1)
k = int(5e0)
nz = int(.5*n)
lam = 3e0
Comment 1 Nate Graham 2020-02-27 16:03:03 UTC
This is an issue in the shared-mime-info product. Please open a bug at https://gitlab.freedesktop.org/xdg/shared-mime-info/issues.

Thanks!
Comment 2 David 2020-02-27 16:04:12 UTC
(In reply to Nate Graham from comment #1)
> This is an issue in the shared-mime-info product. Please open a bug at
> https://gitlab.freedesktop.org/xdg/shared-mime-info/issues.
> 
> Thanks!

But the problem doesn't happen when I browse the folder with nemo or nautilus.
Comment 3 Nate Graham 2020-02-27 17:56:12 UTC
Hmm, maybe those apps use a different mechanism? Not sure. Either way, similar recent bugs have always been traced to shared-mime-info, so let's start there.