-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for exFAT #39
Comments
yeah,. fuse filesystems are tricky. they can be anything ... remote, or even hang on access, or just take a long time. if there is a fuse fs you could also access stuff directly without libgphoto2 |
@hfiguiere - it looks like you were the author of the commit that removed the FUSE code. Do you remember why (I know, I'm asking you about something from 9 years ago!)? |
I don't understand. Why does If fear of hanging is the problem (which I can appreciate, I've experienced how annoying/hard to track down it is when my sshfs just decides to hang when I'm trying to do something simple like At the very least, it's impossible for someone reading the code or searching through the commit history to discover why FUSE support is disabled. This is quite frustrating to an end user who is just trying to get their 64 GB SD card working. AFAIK, exFAT (or NTFS) are the only real options for an SD card > 32 GB, as FAT32 only goes up to 32GB, and it looks like @FatBoyXPC's Nikon camera only supports exFAT. I don't think telling people to go through the filesystem is an acceptable answer here, as most end users aren't using |
So you are complaining that exFAT doesn't work. Please read this about exFAT: In short, don't use SDXC. Also if your camera is USB Mass Storage you don't need gphoto at all for downloading files. As for that commit 9 years ago, without checking, it is likely the one about ignoring FUSE gphoto when listing filesystem: infinite recursion. NINE years ago we wouldn't think that card vendor would be stupid enough to let Microsoft f**** over. |
Supporting exFAT is definitely out of scope. Switch your Nikon to PTP mode. Or use SDHC cards. |
Regarding hooking the camera up directly, I think you're missing the point. To clarify - I'm not using gphoto to download the photos, I'm using Why is supporting exFAT out of the scope? There are many other supported Regarding that commit that "must not be important" - I put that in my Again - there is an answer to this. We can blacklist FUSE as a whole, and On Fri, Feb 5, 2016 at 9:18 PM, Hubert Figuière notifications@github.com
|
exFAT is out of scope because it is a file system. libgphoto does implement filesystem, it implement communication protocols that are exposed through APIs. The "disk:" driver is just wrapper around the filesystem API provided by the OS. Again, no knowledge of the filesystem. |
But it does have knowledge of the filesystem, at least a little bit. It's checking against a list of known filesystem types and names. |
Doesn't the fact that gPhoto explicitly ignores volumes based on the filesystem drivers used to mount them make it very much in scope? That's quite the opposite of "no knowledge of the filesystem." It would be great if we could get some context for what necessitated blacklisting FUSE file systems and figure out if that concern is even still relevant all this time later |
fd and floppy are NOT filesystems. FUSE is blacklisted because there is a gphotofs FUSE filesystem. You don't want recursivity, do you? How about "import from folder". Doesn't darktable to that? |
So it should be possible just to have libgphoto ignore gphotofs volumes without taking the hammer to all of FUSE, right? I'll have to poke around at it some if I get some time |
As a side note, Darktable doesn't actually do import from arbitrary directories on the file system the same way it does from devices that gphoto detects. But that seems secondary at this point to the fact that the library simply ignores any file system mounted through a FUSE driver, which I imagine has probably confused and frustrated many a user before who didn't have the patience to track down the actual code responsible for their issues, and will likely continue to do so. Is this behavior documented anywhere? |
Yes, DT will "import from folder", however, they have purposely made that behavior in a way that it will only reference the files there instead of copy them. Why are fd and floppy not filesystems? I know that they are being checked against (and ignored if those fsnames are found). |
Why don't you want to fix darktable instead. |
Well, fixing this actually fixes both in that it gives exFAT support to this library, which consequentially fixes Darktable. Two birds, one stone. Why are you so opposed to this? Doesn't this all around make this library compatible with more things? |
I would characterize Darktable's approach as a product decision. Not one I'm a huge fan of, but they've made it pretty clear that they don't want to be in the file management business and only see the import module as a way to get images off of a device through libgphoto. I would characterize libgphoto's behavior here as a bug. The library is designed to recognize mounted volumes with a DCIM directory as a camera device, but for a certain subset of external drives (anything that mounts through FUSE) it inexplicably fails to perform as expected. And it takes a very substantial amount of digging to even figure out why. That really seems like something worth a fix |
So your solution is to fix a broken app by breaking a library that other app uses. Sounds legit. |
No, my solution would be to fix the library. Like I said, Darktable is really secondary at this point, this is an issue in the library that deserves a fix. Arbitrarily disregarding a huge swath of file systems because a single one of them is problematic is unexpected, confusing, and frustrating behavior for end users. It's a huge (and worse, not documented as near as I can tell) feature regression just to fix that one issue, and there has to be a better way to resolve it. |
Speaking of gphotofs - that condition is already being checked a few lines above the fuse line (at the end of the fsname block, just before the fstype block). If all we care about is gphotofs causing an infinite loop, that line will certainly prevent it, right? When looking at the commit that introduced this fuse condition, the gphotofs line did not exist. Does this mean the fuse conditions can be removed altogether since gphotofs is already being checked? |
well, one approach to solving this would be whitelisting specific fuse filesystems as needed. e.g. exfat. can we detect that this fuse fs is an exfat? /etc/mtab output from 1st comment does not look like it, but what do you see with /proc/mounts ? |
This will help exfat users hopefully. #39
i tried a fix and it seems to work on opensuse |
I think once it is mounted, the fs type is going to show up as fuse (just due to the driver). That's an assumption on my part, though! That fix seems simple enough, though! Thanks! |
i think i have good code in ... will be in 2.5.10 |
I have a 64GB card that gets formatted to exFAT automatically by my camera. This gets mounted in
/etc/mtab
as fuseblk when automatically mounting through the GUI. I am under the impression the only exFAT driver is FUSE. It appears as though this line prevents it from getting a port name ofdisk:/media/path/
. As expected, if I edit/etc/mtab
after I mount the card, and change 'fuseblk' to just 'fusblk' - this card will get the proper port name (disk:/media/path/
) . See below for the specific commands I ran and for the edits I made to/etc/mtab
.Note: I'm specifically using this for Darktable and doing this modification lets me see my card (and import from) appropriately.
OS: Ubuntu 14.04
/etc/mtab
:➜ ~ gphoto2 --auto-detect Model Port ----------------------------------------------------------
Again - if I change 'fuseblk' to 'fusblk' it will avoid the if statement linked here:
/etc/mtab
:➜ ~ gphoto2 --auto-detect Model Port ---------------------------------------------------------- Mass Storage Camera disk:/media/james/NIKON D3300
I would be more than willing to submit a PR removing this line (and possibly the 3 others in the similar if statements), but it appears as FUSE has been explicitly ignored via this commit although the reason is not stated. Unfortunately, the link in the commit message is dead (which might have contained relevant discussion).
I should note that I would not have been able to accomplish any of this without the help of @jfly. He sat on hangouts with me for hours while we ran down a very deep rabbit hole :)
The text was updated successfully, but these errors were encountered: