Skip to content

Commit

Permalink
Fix Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Apr 3, 2024
1 parent 21d1296 commit 707a15d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/sideload/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -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()).toForwardSlashes();;
auto remotePath = remoteAppFolder.buildPath(f.asRelativePath(app.bundleDir).array()).toForwardSlashes();
if (f.isDir()) {
afcClient.makeDirectory(remotePath);
} else {
Expand Down Expand Up @@ -233,13 +233,16 @@ void sideloadFull(
pragma(inline, true)
private string toForwardSlashes(string s) {
version (Windows) {
foreach (ref c; s) {
char[] str = s.dup;
foreach (ref c; str) {
if (c == '\\') {
c = '/';
}
}
return cast(string) str;
} else {
return s;
}
return s;
}

class NoAppIdRemainingException: Exception {
Expand Down

0 comments on commit 707a15d

Please sign in to comment.