Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Do not specify the locale when mounting FAT devices if it is "C" or s…
Browse files Browse the repository at this point in the history
…tarts with "en" (english).
  • Loading branch information
Ken Moore committed Mar 31, 2014
1 parent fecc583 commit a750011
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src-qt4/pc-mounttray/devCheck.cpp
Expand Up @@ -14,15 +14,20 @@ DevCheck::DevCheck(){
fsDetection.clear();
fsMatch.clear();
fsFilter.clear();
fsDetection << "FAT" << "NTFS" << "EXT" << "ISO 9660" << "Unix Fast File system" << "Reiser" << "XFS"; //string to find in "file -s" output
dsDetection << "FAT" << "NTFS" << "EXT" << "ISO9660" << "UFS" << "Reiser" << "XFS" << "UDF"; //string to find in "diskinfo" output
fsMatch << "FAT" << "NTFS" << "EXT" << "CD9660" << "UFS" << "REISERFS" << "XFS" << "UDF"; //internal labels for the filesystems
fsFilter << "fat" << "ntfs" << "ext" << "cdrom" << "ufs" << "reiser" << "xfs"; //label categories in /dev/
fsDetection << "FAT" << "NTFS" << "EXT" << "ISO 9660" << "Unix Fast File system" << "Reiser" << "XFS" << "HFS"; //string to find in "file -s" output
dsDetection << "FAT" << "NTFS" << "EXT" << "ISO9660" << "UFS" << "Reiser" << "XFS" << "UDF" << "HFS"; //string to find in "diskinfo" output
fsMatch << "FAT" << "NTFS" << "EXT" << "CD9660" << "UFS" << "REISERFS" << "XFS" << "UDF" << "HFS"; //internal labels for the filesystems
fsFilter << "fat" << "ntfs" << "ext" << "cdrom" << "ufs" << "reiser" << "xfs" << "udf" << "hfs"; //label categories in /dev/
//Initialize lists of Manual Filesystems that might be available
fsManual.clear(); fsCMD.clear(); fsBinCheck.clear();
fsManual << "FAT" << "EXFAT" << "NTFS" << "EXT" << "EXT4" << "CD9660" << "UFS" << "REISERFS" << "XFS" << "UDF";
fsManual << "FAT" << "EXFAT" << "NTFS" << "EXT" << "EXT4" << "CD9660" << "UFS" << "REISERFS" << "XFS" << "UDF" << "HFS";
//fsCMD: %1 becomes device path, %2 becomes mointpoint path
fsCMD << "mount -t msdosfs -o large,longnames,-m=755,-L="+QString(getenv("LANG"))+" %1 %2"; //FAT
QString langCode = QString(getenv("LANG"));
if(langCode.startsWith("C.") || langCode.startsWith("en")){
fsCMD << "mount -t msdosfs -o large,longnames,-m=755 %1 %2"; //FAT w/o locale code
}else{
fsCMD << "mount -t msdosfs -o large,longnames,-m=755,-L="+langCode+" %1 %2"; //FAT
}
fsCMD << "mount.exfat-fuse %1 %2"; //EXFAT
fsCMD << "ntfs-3g %1 %2"; //NTFS
fsCMD << "mount -t ext2fs %1 %2"; //EXT
Expand All @@ -32,8 +37,10 @@ DevCheck::DevCheck(){
fsCMD << "mount -t reiserfs %1 %2"; //REISERFS
fsCMD << "mount -t xfs %1 %2"; //XFS
fsCMD << "mount -t udf %1 %2"; //UDF
fsCMD << "hmount %1 %2"; //HFS
fsBinCheck << "/sbin/mount_msdosfs" << "/usr/local/bin/mount.exfat-fuse" << "/usr/local/bin/ntfs-3g" << "/sbin/mount" \
<< "/usr/local/bin/ext4fuse" << "/sbin/mount_cd9660" << "/sbin/mount" << "/sbin/mount" << "/sbin/mount" << "/sbin/mount_udf";
<< "/usr/local/bin/ext4fuse" << "/sbin/mount_cd9660" << "/sbin/mount" << "/sbin/mount" << "/sbin/mount" << "/sbin/mount_udf" \
<< "/usr/local/bin/hmount";
//Initialize the device directory
devDir = QDir(DEVICEDIR);
//Find all the currently active devices (that system is booted from)
Expand Down

0 comments on commit a750011

Please sign in to comment.