BIG-RAT / jamfcpr

Replicate packages between Jamf Pro Servers
Apache License 2.0
76 stars 3 forks source link

shortened modified names by certain characters in the package names #12

Closed randomName0815 closed 1 year ago

randomName0815 commented 2 years ago

hi, i have not been able to test the tool fully yet, because we get strange results when package names contain german characters like ä ö ü. are the names only displayed wrong in the list and can it still be used normally? image

btw. the app crashes when clicking into the empty list after launching the app (v3.3.3)

BIG-RAT commented 2 years ago

Thanks for the heads up. Crash will be easy to fix. Handling the special characters looks to be a bit more challenging. It seems the name returned from the API for the /packages endpoint differs from what is returned from /packages/id. For example: packages endpoint returns (expected results):

image

packages/id/1945 yields:

image

Within the app log I see: [ViewController.fetchPackageList] Packages to replicate: ["̈öü.pkg"] It's like the a character is replaced with a backspace.

Note, if I copy from a locally stored file it looks ok.

[ViewController.fetchPackageList] Packages to replicate: ["äöü.pkg"]
[ViewController.fetchPackageList] sourcePackageRecord: ["checksum": "", "name": "äöü.pkg", "size": "14904", "hashType": "MD5"]

Can't say for sure if this is/relates to the issue yet.

BIG-RAT commented 2 years ago

My testing showed positive results for preserving the name/filename if it contains special characters.

image

Crash should also be resolved in v3.3.4.