Skip to content

Commit

Permalink
fix : illegalArgument axception in BasicFuctionalityUtf8IT'
Browse files Browse the repository at this point in the history
  • Loading branch information
AssahBismarkabah committed Sep 8, 2024
1 parent 4ed2e3c commit 400ee52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ protected void writeDataToPrivate(UserIDAuth auth, String path, String data) {

@SneakyThrows
protected void writeDataToInbox(UserIDAuth owner, UserIDAuth auth, String path, String data) {
String fullPath = "datasafe-root/" + path;
String trimmedPath = path.trim();
String fullPath = "datasafe-root/" + trimmedPath;
try (OutputStream stream = writeToInbox.write(
WriteInboxRequest.forDefaultPublic(owner, Collections.singleton(auth.getUserID()), fullPath)
)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ void readInboxContentWithUnicodeUsingUnicodePath(WithStorageProvider.StorageDesc
jane = registerUser("jane");

String unicodeMessage = "привет мир!";
writeDataToInbox(john, jane, " привет/prüfungsdokument=/файл:&? с пробелом.док", unicodeMessage);
String path = " привет/prüfungsdokument=/файл:&? с пробелом.док";
writeDataToInbox(john, jane, path, unicodeMessage);

String inboxContentJane = readInboxUsingPrivateKey(
jane,
BasePrivateResource.forPrivate(" привет/prüfungsdokument=/файл:&? с пробелом.док")
BasePrivateResource.forPrivate("datasafe-root/" + path.trim())
);

assertThat(inboxContentJane).isEqualTo(unicodeMessage);
Expand Down

0 comments on commit 400ee52

Please sign in to comment.