IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
489 stars 73 forks source link

[NTFS] file type not updated #388

Closed prodigalgvs closed 10 years ago

prodigalgvs commented 10 years ago

Original Title: Issue with file extensions not being displayed correctly within spacefm...

The above only occurs under these circumstances, and not all the time.

Situation:

--Converting FLAC files to MP3 using Soundconverter 2.1.1 --Soundconverter is set to create a folder named the same as the Artist - Album metadata. It is also set to move converted files to said folder as soon as each file is converted. --An existing instance of SpaceFM is open when the conversion process begins. This never occurs if an instance of SpaceFM is opened after the conversion process begins.

What occasionally occurs in SpaceFM: --Folder is created based on the metadata mentioned above and the MP3 files are moved to it upon conversion as per normal. So good so far. --However ... File extensions are still named as FLAC files according to SpaceFM when in fact they are MP3 files.
--Only restarting SpaceFM will bring about the correct file extension. Refreshing or starting a new copy does not fix it until all copies of SpaceFM are shut down and a new instance started.

I know this sounds like it may be a Soundconverter related issue as well, but this never occurs in Thunar or PCmanFM. If I check the files in Thunar, or view the folder initially in Thunar, or have a copy of Thunar open when the conversion begins etc.. they are always displayed correctly as MP3. This only occurs in SpaceFM.

This occurs on a removable USB drive formatted to NTFS.

IgnorantGuru commented 10 years ago

I can't reproduce any problem with SpaceFM detecting changes to a file's mime type in general.

Your report is unclear - it sounds like you're talking about file types but you say "file extension". A file extension (.mp3) is part of the filename. It is never changed automatically by SpaceFM. It is only changed if the file is renamed, or deleted and recreated with a new name. A file type (eg "MP3 audio" audio/mpeg) is displayed in SpaceFM's Type column and in Info|Properties. It will generally change when the file content changes (although some rules for mime types are based on the filename extension, or both).

For example, if I create an empty file:

touch xxx

xxx is identified as a plaintext type (no extension in this case). If I write mp3 data to the file:

cat test.mp3 >> xxx
# where test.mp3 is a valid mp3 file

In SpaceFM, it now shows the file type as "MP3 audio" (mime type in Info|Properties shows audio/mpeg). So the change is detected. Same for changing an MP3 file to a FLAC file:

cat test.flac > xxx

I did not test NTFS specifically, so you might want to run similar tests there. Note that if a file has .mp3 extension, it will always be identified as mime type MP3 (that's how freedesktop database does it - other programs may vary in identification, and your freedesktop database may vary).

I'm unlikely to install a 3rd party app to test something like this (very time consuming), so please try to provide generic steps to reproduce any problem, like the commands above. Also, you might add a screencast to this issue so I can see the before and after effect (or screenshots showing same), and others might reproduce it. Overall this report is unclear.

prodigalgvs commented 10 years ago

i get where you are coming from. It would have been better to say it "shows the wrong file type." It shows the files that are actually MP3 in format as being FLAC in format. Mediainfo reads them as MP3 even with the FLAC extension as do other FMs and audio apps,.

This is very rare. But it does happen.

With all the issues I post (files not queueing, the above, etc. etc.) the issues are always on the same External 2TB USB HDD, w/ NTFS. I cannot recall having an issue w/o that configuration. I truly wish there was a linux tool set for NTFS that can not only diagnose errors in the file system,but repair them.

Gordon VS gvscheik1@cciwireless.ca

On 13-11-27 05:06 AM, IgnorantGuru wrote:

I can't reproduce any problem with SpaceFM detecting changes to a file's mime type in general.

Your report is unclear - it sounds like you're talking about file types but you say "file extension". A file extension (.mp3) is part of the filename. It is never changed automatically by SpaceFM. It is only changed if the file is renamed, or deleted and recreated with a new name. A file type (eg "MP3 audio" audio/mpeg) is displayed in SpaceFM's Type column and in Info|Properties. It will generally change when the file content changes (although some rules for mime types are based on the filename extension, or both).

For example, if I create an empty file: touch xxx

xxx is identified as a plaintext type (no extension in this case). If I write mp3 data to the file:

|cat test.mp3 >> xxx

where test.mp3 is a valid mp3 file

In SpaceFM, it now shows the file type as "MP3 audio" (mime type in Info|Properties shows audio/mpeg). So the change is detected. Same for changing an MP3 file to a FLAC file:

cat test.flac > xxx

I did not test NTFS specifically, so you might want to run similar tests there. Note that if a file has .mp3 extension, it will always be identified as mime type MP3 (that's how freedesktop database does it - other programs may vary in identification, and your freedesktop database may vary).

I'm unlikely to install a 3rd party app to test something like this (very time consuming), so please try to provide generic steps to reproduce any problem, like the commands above. Also, you might add a screencast to this issue so I can see the before and after effect (or screenshots showing same), and others might reproduce it. Overall this report is unclear.


Reply to this email directly or view it on GitHub https://github.com/IgnorantGuru/spacefm/issues/388#issuecomment-29379525.

IgnorantGuru commented 10 years ago

Whatever it is, it doesn't sound worthy of any development time, so closing.