Comments (11)
The "Tracker Kind shows" column above is rubbish, I've sinced removed it. I meant to say:
- on ext2/3/4 the script is recognized by Tracker as a "Be application", under fat32/ntfs as "Generic file".
- on ext2/3/4 the zip is recognized by Tracker as a "Generic file", under fat32/ntfs as "ZIP archive".
from filer.
Filer uses the MIME type of the file to determine if it's a shell command ("text/plain"), an archive ("application/zip"), or a generic file ("application/octet-stream"). What are the MIME types of your files when Haiku recognizes them as "Be application", etc.?
I have just noticed that:
-
.rsrc files are "application/octet-stream".
-
.o files have Kind "Be application" and an empty MIME type. (That's probably why script files from ext2/3/4 don't show up in file panels.)
I will change the code so that files with an empty MIME type get the same treatment as generic files. Now Filer really shows too many unknown/generic files in file panels.
Maybe a good compromise would be let the file panels for Archive and Command actions be restrictive and only show text or zip files. If the user wants to use the files with generic/unknown types, the drag&drop option is available.
from filer.
Filer uses the MIME type of the file to determine if it's a shell command ("text/plain"), an archive ("application/zip"), or a generic file ("application/octet-stream"). What are the MIME types of your files when Haiku recognizes them as "Be application", etc.?
As you correctly predicted, its file type is empty.
Maybe a good compromise would be let the file panels for Archive and Command actions be restrictive and only show text or zip files. If the user wants to use the files with generic/unknown types, the drag&drop option is available.
I don't think that's a good idea. Maybe the user isn't even aware of drag&drop and wonders why the file panel doesn't show his files while Tracker does.
.rsrc files are "application/octet-stream".
.o files have Kind "Be application" and an empty MIME type. (That's probably why script files from ext2/3/4 don't show up in file panels.)
I will change the code so that files with an empty MIME type get the same treatment as generic files. Now Filer really shows too many unknown/generic files in file panels.
Good. It's better to show too many files in the filtered file panels than too few. Also, most probably the scripts/archives the user sets as actions aren't in a location where there are .o or .rsrc files or even untyped generic files.
Alternatively, we could abandon filtered file pnels altogether, but I think it helps more to filter out the definitely unwanted files than showing sometimes a few untyped/generic files alongside.
from filer.
Does PR #116 fix this issue?
from filer.
Nope. I think it's a problem of what Haiku's file systems report. The behaviour described in those tables is still there, after #116 was merged.
from filer.
Hmm, I have to conclude that the MIME types of these files are neither empty nor generic ("application/octet-stream"). Can you try master...owenca:master to see what these mysterious MIME types are?
from filer.
Unfortunately, your code changes only print the MIME types when the file panel is opened the first time, which is always at /boot/home. Switching to a foreign-fs partition on my stick doesn't output anything.
from filer.
I hardcoded the path and did a SetPanelDirectory() when the filepanel is created. Here's the output:
Shell command
Filesystem | Filepanel shows | Terminal output |
---|---|---|
ext2/3/4 | ZIP.zip | SCRIPT.sh: application/x-vnd.Be-elfexecutable |
fat32/ntfs | SCRIPT.sh | ZIP.zip: application/zip |
Add to archive
Filesystem | Filepanel shows | Terminal output |
---|---|---|
ext2/3/4 | ZIP.zip | SCRIPT.sh: application/x-vnd.Be-elfexecutable |
fat32/ntfs | SCRIPT.sh + ZIP.zip | nothing |
from filer.
Unfortunately, your code changes only print the MIME types when the file panel is opened the first time
Weird. It works for me when I open the file panel for "Add to archive" or "Shell command", the only cases Filer looks for a particular MIME type. The extra code just prints the files that won't appear in file panel, including whenever the current folder changes in the panel.
Here's the output
From your tables, I can deduce the MIME types:
Filesystem | SCRIPT.sh | ZIP.zip |
---|---|---|
ext2/3/4 | application/x-vnd.Be-elfexecutable | application/octet-stream |
fat32/ntfs | application/octet-stream | application/zip |
So the elf executable is a "new" MIME type for Filer. I have added it to the MIME types of "Shell command". Can you try the updated commit?
from filer.
The first row of your first table will look like this now:
Shell command
Filesystem | Filepanel shows | Terminal output |
---|---|---|
ext2/3/4 | SCRIPT.sh + ZIP.zip | nothing |
There will be no change in the second row, and the other table will stay the same.
from filer.
Yep. BTW, I was confused by the missing output for fat32 back then. It all works as expected, and I do see the output when trying with ext2, for example. I just wasn't prepared to "no output" and accidentally always tried with dropping the fat32 volume into the file panel and therefore assumed something was wrong... :)
from filer.
Related Issues (20)
- Conflict window: also shows location HOT 6
- Order of the tabs should follow the workflow HOT 2
- Beautfy the Conflict window HOT 2
- Crash on ignore conflicting file when multiple rules HOT 11
- Drag&drop behaviour and file panel modes/filters HOT 26
- Filer Zone replicant doesn't work well with Shelves different from Desktop
- Crash on rule involving attr checks
- Remove SQLite dependency
- Crashing Filer 1.2.2 HOT 2
- Add icon-button to specific tests to open file dialogs
- Replace Add/Remove buttons in AutoFiler tab to +/- buttons HOT 1
- File dialogs for folder-only selection should hide all files HOT 1
- Remove SQLite.
- Change file panel titles HOT 6
- Update and add more translations HOT 43
- doesn't build on x86_64 (gcc5)
- Filer crash immediately HOT 24
- gcc5 linker fails when linking AutoFiler
- Need to make v1.2.0 backward compatible with v1.1.0 wrt AutoFilerFolders
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filer.