Comment 27 for bug 617885

Revision history for this message
Curtis Gedak (gedakc) wrote :

Thank you Luca and Seth for clarifying the problem for me.

If I understand this correctly, one of the best ways to avoid this problem is to not use Glib::ustring when reading data directly from the disk.

Luca,

I will investigate removing the Glib::ustring stuff from the GParted_Core::get_filesystem() method to avoid this potential problem for other file system types.

Seth,

I was about to apply the patch from comment #12 but noticed there might be an undesired side effect. It appears to me that if a match is found for the BTRFS_SIGNATURE, then the method will exit returning FS_BTRFS, but that the following line to close the device will not be executed.

Have I interpreted the patch code correctly?

If so, would you like to rework the patch to permit closing of the device?
If not, I can rework the patch. I would still give credit to you though since you found the underlying problem. :-)