Skip to content

Commit 8ded11c

Browse files
Merge pull request #34 from jamf/BIG-RAT_multipartUploads
Big rat multipart uploads
2 parents 98f0c69 + 7aadd49 commit 8ded11c

24 files changed

Lines changed: 811 additions & 275 deletions

‎CHANGELOG.md‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [1.3.3] - 2024-09-20
7+
## [1.3.3] - 2024-10-21
88
### Bug fixes
9-
- Changed the wording for the delete prompt to be a little less ambiguous.
10-
- Added a potential fix for a DUPLICATE_FIELD error that would sometimes happen.
9+
- Added multipart uploads to solve an issue with >5GB uploads to JCDS distribution points. (GitHub issue #4 "Not able to upload huge files like 14GB.")
10+
- Changed the wording for the delete prompt to be a little less ambiguous. (GitHub issue #11: "Delete dialog ambiguity")
11+
- Fixed an issue where Cancel didn't stop uploading to a JCDS distribution point. (GitHub issue #15: "The file upload action cannot be canceled")
12+
- Fixed an issue where it would attempt to synchronize files that are not allowed by Jamf Pro. (GitHub issue #25: "UNSUPPORTED_FILE_TYPE")
13+
- Fixed a problem where it would only load 100 packages from Jamf Pro. This fix likely also fixed a DUPLICATE_FIELD error that would sometimes happen. (GitHub issue #28: "DUPLICATE_FIELD packageName")
14+
- Fixed an issue that would cause a synchronization from JCDS to Cloud to fail.
15+
- Fixed an issue where the progress view wouldn't go away if the synchronization completed while the cancel confirmation was shown.
16+
- Changed the wording when it fails to unmount a file share to indicate that it may have been unmounted externally.
1117

1218
## [1.3.2] - 2024-07-02
1319
### Bug fixes

‎Jamf Sync.xcodeproj/project.pbxproj‎

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
841227A12BEADD6E0097B83E /* XmlErrorParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841227A02BEADD6E0097B83E /* XmlErrorParserTests.swift */; };
1616
841DE9D92BA395900092DBE7 /* Jamf Sync User Guide.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 841DE9D82BA395900092DBE7 /* Jamf Sync User Guide.pdf */; };
1717
843BE0F62AEFE6350053431B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 843BE0F52AEFE6350053431B /* Assets.xcassets */; };
18+
84413C972CA7586900363CFA /* MultipartUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84413C962CA7586300363CFA /* MultipartUpload.swift */; };
19+
84413CA12CA75A7E00363CFA /* UploadTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84413CA02CA75A7B00363CFA /* UploadTime.swift */; };
1820
844CF9D12AC4B96600576E1A /* FolderDp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844CF9D02AC4B96600576E1A /* FolderDp.swift */; };
1921
844CF9D32AC4C76A00576E1A /* JamfProInstance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844CF9D22AC4C76A00576E1A /* JamfProInstance.swift */; };
2022
844E40D12B4F46FD003D1940 /* Checksums.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844E40D02B4F46FD003D1940 /* Checksums.swift */; };
@@ -36,6 +38,7 @@
3638
84761CA02AFEE259006BBF72 /* FileHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84761C9F2AFEE259006BBF72 /* FileHash.swift */; };
3739
848C2D262BC47B3300036999 /* CharacterSet_rfc3986Unreserved.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848C2D252BC47B3300036999 /* CharacterSet_rfc3986Unreserved.swift */; };
3840
848C2D282BC48A3800036999 /* GeneralCloudDp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848C2D272BC48A3800036999 /* GeneralCloudDp.swift */; };
41+
849809DB2CB8575B001F94C9 /* UploadTimeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849809DA2CB8575B001F94C9 /* UploadTimeTests.swift */; };
3942
849FC3412BD06A43008BAC02 /* VersionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849FC3402BD06A43008BAC02 /* VersionInfo.swift */; };
4043
84AB59C52B20D569007333AD /* CloudSessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AB59C42B20D569007333AD /* CloudSessionDelegate.swift */; };
4144
84B967642B74157C00D73F75 /* HelpMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B967632B74157C00D73F75 /* HelpMenu.swift */; };
@@ -59,6 +62,7 @@
5962
84BC6E492AC380FD00CF6D39 /* FolderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BC6E482AC380FD00CF6D39 /* FolderView.swift */; };
6063
84BC6E4D2AC38C6200CF6D39 /* FileShare.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BC6E4A2AC38C6200CF6D39 /* FileShare.swift */; };
6164
84BC6E552AC4933500CF6D39 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 84BC6E542AC4933500CF6D39 /* README.md */; };
65+
84BF5E3A2CC15FD3008B07A1 /* TemporaryFiles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BF5E392CC15FB4008B07A1 /* TemporaryFiles.swift */; };
6266
84CAB0E52C25C47400582D59 /* FileManager+moveRetainingPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CAB0E42C25C47400582D59 /* FileManager+moveRetainingPermissions.swift */; };
6367
84CCB5D22B4C852F00328291 /* SetupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CCB5D12B4C852F00328291 /* SetupViewModel.swift */; };
6468
84CCB5D42B4C946200328291 /* LogViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CCB5D32B4C946200328291 /* LogViewModel.swift */; };
@@ -92,6 +96,8 @@
9296
84FC416A2AD898B000DCB033 /* Haversack in Frameworks */ = {isa = PBXBuildFile; productRef = 84FC41692AD898B000DCB033 /* Haversack */; };
9397
84FC418B2ADD7B1000DCB033 /* StoredSettings.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 84FC41892ADD7B1000DCB033 /* StoredSettings.xcdatamodeld */; };
9498
84FC418E2ADD89AD00DCB033 /* DataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84FC418D2ADD89AD00DCB033 /* DataManager.swift */; };
99+
CE9899B32C9A7A77000C36B7 /* KeepAwake.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9899B22C9A7A77000C36B7 /* KeepAwake.swift */; };
100+
CE9899B72C9A8C4B000C36B7 /* CompletedChunk.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9899B62C9A8C4B000C36B7 /* CompletedChunk.swift */; };
95101
/* End PBXBuildFile section */
96102

97103
/* Begin PBXContainerItemProxy section */
@@ -121,6 +127,8 @@
121127
841DE9D82BA395900092DBE7 /* Jamf Sync User Guide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "Jamf Sync User Guide.pdf"; sourceTree = "<group>"; };
122128
841DE9DA2BA395F00092DBE7 /* User Guide */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "User Guide"; sourceTree = "<group>"; };
123129
843BE0F52AEFE6350053431B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
130+
84413C962CA7586300363CFA /* MultipartUpload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultipartUpload.swift; sourceTree = "<group>"; };
131+
84413CA02CA75A7B00363CFA /* UploadTime.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadTime.swift; sourceTree = "<group>"; };
124132
844CF9D02AC4B96600576E1A /* FolderDp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderDp.swift; sourceTree = "<group>"; };
125133
844CF9D22AC4C76A00576E1A /* JamfProInstance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JamfProInstance.swift; sourceTree = "<group>"; };
126134
844E40D02B4F46FD003D1940 /* Checksums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Checksums.swift; sourceTree = "<group>"; };
@@ -143,6 +151,7 @@
143151
84761C9F2AFEE259006BBF72 /* FileHash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileHash.swift; sourceTree = "<group>"; };
144152
848C2D252BC47B3300036999 /* CharacterSet_rfc3986Unreserved.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterSet_rfc3986Unreserved.swift; sourceTree = "<group>"; };
145153
848C2D272BC48A3800036999 /* GeneralCloudDp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralCloudDp.swift; sourceTree = "<group>"; };
154+
849809DA2CB8575B001F94C9 /* UploadTimeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadTimeTests.swift; sourceTree = "<group>"; };
146155
849FC3402BD06A43008BAC02 /* VersionInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionInfo.swift; sourceTree = "<group>"; };
147156
84AB59C42B20D569007333AD /* CloudSessionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudSessionDelegate.swift; sourceTree = "<group>"; };
148157
84B967632B74157C00D73F75 /* HelpMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpMenu.swift; sourceTree = "<group>"; };
@@ -170,6 +179,7 @@
170179
84BC6E482AC380FD00CF6D39 /* FolderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderView.swift; sourceTree = "<group>"; };
171180
84BC6E4A2AC38C6200CF6D39 /* FileShare.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileShare.swift; sourceTree = "<group>"; };
172181
84BC6E542AC4933500CF6D39 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
182+
84BF5E392CC15FB4008B07A1 /* TemporaryFiles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemporaryFiles.swift; sourceTree = "<group>"; };
173183
84CAB0E42C25C47400582D59 /* FileManager+moveRetainingPermissions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileManager+moveRetainingPermissions.swift"; sourceTree = "<group>"; };
174184
84CCB5D12B4C852F00328291 /* SetupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetupViewModel.swift; sourceTree = "<group>"; };
175185
84CCB5D32B4C946200328291 /* LogViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewModel.swift; sourceTree = "<group>"; };
@@ -201,6 +211,8 @@
201211
84FC41652AD895F400DCB033 /* KeychainHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainHelper.swift; sourceTree = "<group>"; };
202212
84FC418A2ADD7B1000DCB033 /* StoredSettings.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = StoredSettings.xcdatamodel; sourceTree = "<group>"; };
203213
84FC418D2ADD89AD00DCB033 /* DataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataManager.swift; sourceTree = "<group>"; };
214+
CE9899B22C9A7A77000C36B7 /* KeepAwake.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeepAwake.swift; sourceTree = "<group>"; };
215+
CE9899B62C9A8C4B000C36B7 /* CompletedChunk.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompletedChunk.swift; sourceTree = "<group>"; };
204216
/* End PBXFileReference section */
205217

206218
/* Begin PBXFrameworksBuildPhase section */
@@ -271,8 +283,9 @@
271283
isa = PBXGroup;
272284
children = (
273285
847298EE2BDC5566002D4652 /* Info.plist */,
274-
84BC6E1F2AC312AA00CF6D39 /* Model */,
275286
84BC6DFC2AC3122200CF6D39 /* JamfSync.entitlements */,
287+
84BC6E1F2AC312AA00CF6D39 /* Model */,
288+
CE9899AF2C9A6A20000C36B7 /* Multipart */,
276289
84BC6E212AC312F300CF6D39 /* Resources */,
277290
84BC6E1E2AC3129900CF6D39 /* UI */,
278291
84BC6E202AC312BF00CF6D39 /* Utility */,
@@ -299,6 +312,7 @@
299312
846499E32B6B080B00A8EA7B /* SynchronizeTaskTests.swift */,
300313
846499D22B64165E00A8EA7B /* TestErrors.swift */,
301314
841227A02BEADD6E0097B83E /* XmlErrorParserTests.swift */,
315+
849809DA2CB8575B001F94C9 /* UploadTimeTests.swift */,
302316
);
303317
path = JamfSyncTests;
304318
sourceTree = "<group>";
@@ -372,6 +386,7 @@
372386
84BC6E202AC312BF00CF6D39 /* Utility */ = {
373387
isa = PBXGroup;
374388
children = (
389+
84BF5E392CC15FB4008B07A1 /* TemporaryFiles.swift */,
375390
84E4899D2B5C623500FFFE59 /* ArgumentParser.swift */,
376391
848C2D252BC47B3300036999 /* CharacterSet_rfc3986Unreserved.swift */,
377392
84AB59C42B20D569007333AD /* CloudSessionDelegate.swift */,
@@ -429,6 +444,17 @@
429444
path = CoreData;
430445
sourceTree = "<group>";
431446
};
447+
CE9899AF2C9A6A20000C36B7 /* Multipart */ = {
448+
isa = PBXGroup;
449+
children = (
450+
84413CA02CA75A7B00363CFA /* UploadTime.swift */,
451+
84413C962CA7586300363CFA /* MultipartUpload.swift */,
452+
CE9899B62C9A8C4B000C36B7 /* CompletedChunk.swift */,
453+
CE9899B22C9A7A77000C36B7 /* KeepAwake.swift */,
454+
);
455+
path = Multipart;
456+
sourceTree = "<group>";
457+
};
432458
/* End PBXGroup section */
433459

434460
/* Begin PBXNativeTarget section */
@@ -497,7 +523,7 @@
497523
attributes = {
498524
BuildIndependentTargetsInParallel = 1;
499525
LastSwiftUpdateCheck = 1500;
500-
LastUpgradeCheck = 1510;
526+
LastUpgradeCheck = 1600;
501527
TargetAttributes = {
502528
84BC6DEF2AC3122100CF6D39 = {
503529
CreatedOnToolsVersion = 15.0;
@@ -581,6 +607,7 @@
581607
84CCB5D22B4C852F00328291 /* SetupViewModel.swift in Sources */,
582608
84CCB5D42B4C946200328291 /* LogViewModel.swift in Sources */,
583609
848C2D282BC48A3800036999 /* GeneralCloudDp.swift in Sources */,
610+
CE9899B32C9A7A77000C36B7 /* KeepAwake.swift in Sources */,
584611
84DD58392BC58F2E00E8DA23 /* JamfProPackageClassicApi.swift in Sources */,
585612
84E2AE762AF85EC700AE8284 /* LogMessage.swift in Sources */,
586613
840A79072ACC8EFF00161D85 /* FolderInstance.swift in Sources */,
@@ -606,7 +633,9 @@
606633
84BC6E3B2AC3631400CF6D39 /* DpFiles.swift in Sources */,
607634
84E4898F2B58679600FFFE59 /* HeaderView.swift in Sources */,
608635
84FC415E2AD5A5C600DCB033 /* SynchronizeProgressView.swift in Sources */,
636+
84413CA12CA75A7E00363CFA /* UploadTime.swift in Sources */,
609637
84E489952B58830A00FFFE59 /* ChecksumView.swift in Sources */,
638+
CE9899B72C9A8C4B000C36B7 /* CompletedChunk.swift in Sources */,
610639
8463EF2B2AE6D3040028D591 /* FileSharePasswordView.swift in Sources */,
611640
84BC6E352AC3631400CF6D39 /* Package.swift in Sources */,
612641
84BC6E392AC3631400CF6D39 /* DataModel.swift in Sources */,
@@ -615,6 +644,7 @@
615644
84E489972B59BBFD00FFFE59 /* PackageAnimationView.swift in Sources */,
616645
84EBFE9B2B348A77008E502C /* DataPersistence.swift in Sources */,
617646
84BC6E382AC3631400CF6D39 /* JsonObjects.swift in Sources */,
647+
84BF5E3A2CC15FD3008B07A1 /* TemporaryFiles.swift in Sources */,
618648
84BC6E432AC3659600CF6D39 /* PackageListView.swift in Sources */,
619649
84FC41602AD5A78C00DCB033 /* View+NSWindow.swift in Sources */,
620650
84E2AE742AF85DFE00AE8284 /* LogManager.swift in Sources */,
@@ -628,6 +658,7 @@
628658
84FC418B2ADD7B1000DCB033 /* StoredSettings.xcdatamodeld in Sources */,
629659
84BC6DF42AC3122100CF6D39 /* JamfSyncApp.swift in Sources */,
630660
84AB59C52B20D569007333AD /* CloudSessionDelegate.swift in Sources */,
661+
84413C972CA7586900363CFA /* MultipartUpload.swift in Sources */,
631662
84D568622BD0722B00C91686 /* AboutView.swift in Sources */,
632663
844E40D32B505404003D1940 /* PackageListViewModel.swift in Sources */,
633664
84FC41662AD895F400DCB033 /* KeychainHelper.swift in Sources */,
@@ -650,6 +681,7 @@
650681
846499E42B6B080B00A8EA7B /* SynchronizeTaskTests.swift in Sources */,
651682
846499E82B6BFCA900A8EA7B /* Jcds2DpTests.swift in Sources */,
652683
846499E22B6AA7C300A8EA7B /* FileShareDpTests.swift in Sources */,
684+
849809DB2CB8575B001F94C9 /* UploadTimeTests.swift in Sources */,
653685
846499D32B64165E00A8EA7B /* TestErrors.swift in Sources */,
654686
846499D12B631B6A00A8EA7B /* MockFileManager.swift in Sources */,
655687
846499CF2B630D7700A8EA7B /* FolderDpTests.swift in Sources */,
@@ -868,7 +900,6 @@
868900
84BC6E192AC3122200CF6D39 /* Debug */ = {
869901
isa = XCBuildConfiguration;
870902
buildSettings = {
871-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
872903
BUNDLE_LOADER = "$(TEST_HOST)";
873904
CODE_SIGN_STYLE = Automatic;
874905
CURRENT_PROJECT_VERSION = 1;
@@ -888,7 +919,6 @@
888919
84BC6E1A2AC3122200CF6D39 /* Release */ = {
889920
isa = XCBuildConfiguration;
890921
buildSettings = {
891-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
892922
BUNDLE_LOADER = "$(TEST_HOST)";
893923
CODE_SIGN_STYLE = Automatic;
894924
CURRENT_PROJECT_VERSION = 1;
@@ -908,7 +938,6 @@
908938
84BC6E1C2AC3122200CF6D39 /* Debug */ = {
909939
isa = XCBuildConfiguration;
910940
buildSettings = {
911-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
912941
CODE_SIGN_STYLE = Automatic;
913942
CURRENT_PROJECT_VERSION = 1;
914943
DEAD_CODE_STRIPPING = YES;
@@ -928,7 +957,6 @@
928957
84BC6E1D2AC3122200CF6D39 /* Release */ = {
929958
isa = XCBuildConfiguration;
930959
buildSettings = {
931-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
932960
CODE_SIGN_STYLE = Automatic;
933961
CURRENT_PROJECT_VERSION = 1;
934962
DEAD_CODE_STRIPPING = YES;

‎Jamf Sync.xcodeproj/xcshareddata/xcschemes/Jamf Sync.xcscheme‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1510"
3+
LastUpgradeVersion = "1600"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

‎JamfSync/Model/DistributionPoint.swift‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ enum DistributionPointError: Error {
2424
case downloadingNotSupported
2525
case uploadingNotSupported
2626
case uploadFailure
27+
case maxUploadSizeExceeded
2728
}
2829

2930
enum ReadWriteCapable {
@@ -41,6 +42,9 @@ enum ReadWriteCapable {
4142
}
4243

4344
class DistributionPoint: Identifiable {
45+
/// Manages temporary files
46+
let temporaryFileManager = TemporaryFileManager()
47+
4448
/// The unique id of the distribution point.
4549
var id = UUID()
4650

@@ -119,7 +123,9 @@ class DistributionPoint: Identifiable {
119123

120124
/// Retrieves a list of files that are associated with the distribution point. The dpFiles
121125
/// Each type of distribution point must override this and provide its own implementation.
122-
func retrieveFileList() async throws {
126+
/// - Parameters:
127+
/// - limitFileTypes: Whether to limit file types to only the allowed types for Jamf Pro
128+
func retrieveFileList(limitFileTypes: Bool = true) async throws {
123129
// This function must be overridden by a child class
124130
throw DistributionPointError.programError
125131
}
@@ -407,7 +413,7 @@ class DistributionPoint: Identifiable {
407413
return dpFiles
408414
}
409415

410-
private func isAcceptableForDp(url: URL) -> Bool {
416+
func isAcceptableForDp(url: URL) -> Bool {
411417
guard url.pathExtension != "dmg" else { return true } // Include .dmg files
412418
guard !url.lastPathComponent.hasSuffix(".pkg.zip") && !url.lastPathComponent.hasSuffix(".mpkg.zip") else { return true } // Include zip files that have ".pkg.zip" or ".mpkg.zip"
413419
guard url.pathExtension == "pkg" || url.pathExtension == "mpkg" else { return false } // Exclude if not ".pkg" or ".mpkg"

‎JamfSync/Model/FileShareDp.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ class FileShareDp: DistributionPoint {
7575
}
7676
}
7777

78-
override func retrieveFileList() async throws {
78+
override func retrieveFileList(limitFileTypes: Bool = true) async throws {
7979
try await mount()
8080
guard let localPath else {
8181
throw DistributionPointError.cannotGetFileList
8282
}
83-
try await retrieveLocalFileList(localPath: localPath)
83+
try await retrieveLocalFileList(localPath: localPath, limitFileTypes: limitFileTypes)
8484
}
8585

8686
override func transferFile(srcFile: DpFile, moveFrom: URL? = nil, progress: SynchronizationProgress) async throws {

‎JamfSync/Model/FolderDp.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class FolderDp: DistributionPoint {
1616
return true
1717
}
1818

19-
override func retrieveFileList() async throws {
20-
try await retrieveLocalFileList(localPath: filePath)
19+
override func retrieveFileList(limitFileTypes: Bool = true) async throws {
20+
try await retrieveLocalFileList(localPath: filePath, limitFileTypes: limitFileTypes)
2121
}
2222

2323
override func deleteFile(file: DpFile, progress: SynchronizationProgress) async throws {

0 commit comments

Comments
 (0)