diff --git a/.gitignore b/.gitignore index b9d54d1..8a30d25 100644 --- a/.gitignore +++ b/.gitignore @@ -396,6 +396,3 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml - -# Inno Setup -SetupFiles/ \ No newline at end of file diff --git a/AFCExplorer/MainWindow.xaml.cs b/AFCExplorer/MainWindow.xaml.cs index c486870..c64b8b7 100644 --- a/AFCExplorer/MainWindow.xaml.cs +++ b/AFCExplorer/MainWindow.xaml.cs @@ -59,12 +59,9 @@ namespace AFCExplorer { if (fn == "." || fn == "..") continue; afc.afc_get_file_info(afcHandle, path + fn, out ReadOnlyCollection fileInfo).ThrowOnError(); - Dictionary fileInfoD = new Dictionary(); - for (int i = 0; i < fileInfo.Count; i += 2) fileInfoD.Add(fileInfo[i], fileInfo[i+1]); - //MessageBox.Show(string.Join("\n", fileInfo)); - string readableSize = FormatBytes(ulong.Parse(fileInfoD["st_size"])); - string readableType = ReadableTypes[fileInfoD["st_ifmt"]]; - int unixSeconds = (int)(((long.Parse(fileInfoD["st_mtime"]) / 1000) / 1000) / 1000); + string readableSize = FormatBytes(ulong.Parse(fileInfo[1])); + string readableType = fileInfo[7] == "S_IFDIR" ? "Directory" : "File"; + int unixSeconds = (int)(((long.Parse(fileInfo[9]) / 1000) / 1000) / 1000); string readableTime = DateTimeOffset.FromUnixTimeSeconds(unixSeconds).DateTime.ToString(); afcDirectory.Add(new AFCFileType(fn, readableType, readableTime, readableSize)); } @@ -362,12 +359,5 @@ namespace AFCExplorer return string.Format("{0:0.##} {1}", dblSByte, Suffix[i]); } - - public static Dictionary ReadableTypes = new Dictionary - { - { "S_IFDIR", "Directory" }, - { "S_IFREG", "File" }, - { "S_IFLNK", "Symbolic Link" }, - }; } } diff --git a/AFCExplorerSetup.iss b/AFCExplorerSetup.iss deleted file mode 100644 index 3f4eed3..0000000 --- a/AFCExplorerSetup.iss +++ /dev/null @@ -1,23 +0,0 @@ -[Setup] -AppName=AFCExplorer -AppPublisher=KawaiiZenbo -AppVerName=AFCExplorer -AppVersion=1.0.1 -WizardStyle=modern -DefaultDirName={autopf}\AFCExplorer -DefaultGroupName=AFCExplorer -UninstallDisplayIcon={app}\AFCExplorer.exe -Compression=lzma2 -SolidCompression=yes -OutputDir=.\SetupFiles - -[Files] -Source: "AFCExplorer\bin\Release\*"; DestDir: "{app}" -Source: "AFCExplorer\bin\Release\win-x86\*"; DestDir: "{app}\win-x86" - -[Icons] -Name: "{group}\AFCExplorer"; Filename: "{app}\AFCExplorer.exe" -Name: "{commondesktop}\AFCExplorer"; Filename: "{app}\AFCExplorer.exe"; Tasks: desktopicon - -[Tasks] -Name: desktopicon; Description: "Create a &desktop icon"; diff --git a/README.md b/README.md index f41330b..1911b97 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ AFC File Browser for iOS Devices ## Requirements -Windows 7 SP1 or later -iTunes 10 or later, or the Apple Devices app -.NET Framework 4.7.2 or later -Apple File Conduit 2 Tweak (if using AFC2 mode) +Windows 7 SP1 or later +iTunes 10 or later (ensure "Apple Devices" from Microsoft Store is NOT installed) +.NET Framework 4.7.2 or later +Apple File Conduit 2 Tweak (if using AFC2 mode)