Skip to content

Commit

Permalink
Fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Apr 3, 2024
1 parent f620102 commit 9aa0c8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions source/sideload/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void sideloadFull(
"PackageType", "Developer"
);

auto remoteAppFolder = stagingDir.buildPath(baseName(app.bundleDir));
auto remoteAppFolder = stagingDir.buildPath(baseName(app.bundleDir)).toForwardSlashes();
if (afcClient.getFileInfo(remoteAppFolder, props) != AFCError.AFC_E_SUCCESS) {
// The directory does not exist, so let's create it!
afcClient.makeDirectory(remoteAppFolder).assertSuccess();
Expand All @@ -172,7 +172,7 @@ void sideloadFull(
auto transferStep = 3 / (STEP_COUNT * files.length * 4);

foreach (f; files) {
auto remotePath = remoteAppFolder.buildPath(f.asRelativePath(app.bundleDir).array());
auto remotePath = remoteAppFolder.buildPath(f.asRelativePath(app.bundleDir).array()).toForwardSlashes();;
if (f.isDir()) {
afcClient.makeDirectory(remotePath);
} else {
Expand Down Expand Up @@ -230,6 +230,18 @@ void sideloadFull(
progressCallback(1.0, "Done!");
}

pragma(inline, true)
private string toForwardSlashes(string s) {
version (Windows) {
foreach (ref c; remoteAppFolder) {
if (c == '\\') {
c = '/';
}
}
}
return s;
}

class NoAppIdRemainingException: Exception {
this(DateTime minExpirationDate, string file = __FILE__, int line = __LINE__) {
super(format!"Cannot make any more app ID, you have to wait until %s to get a new app ID"(minExpirationDate.toSimpleString()), file, line);
Expand Down
2 changes: 1 addition & 1 deletion source/usbmuxd/c.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ version (Windows) {
enum libusbmuxd = LibImport("usbmuxd.dll");
}
} else version (OSX) {
enum libusbmuxd = LibImport("libusbmuxd-2.0.6.dylib");
enum libusbmuxd = LibImport("libusbmuxd.dylib");
} else {
enum libusbmuxd = LibImport("libusbmuxd-2.0.so.6", "libusbmuxd.so.2");
}
Expand Down

0 comments on commit 9aa0c8d

Please sign in to comment.