Skip to content

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 2, 2023

After nextcloud/server#40644 it's possible to delete, restore and favorite files with special characters like # but the displayed filenames are also encoded.

This PR adds a new property encodedSource to handle it nicer.

I'm aware we could also split the given source uri and encode only the path. Such an approach will fail on some obscure uri we didn't think of and therefore the most reliable way for me is to let the caller generate the encoded source.

@kesselb kesselb changed the title fix: add encodedSource property feat!: add NodeData.encodedSource Oct 2, 2023
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #789 (b6c9b92) into master (ad16003) will increase coverage by 0.41%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #789      +/-   ##
==========================================
+ Coverage   77.69%   78.11%   +0.41%     
==========================================
  Files          17       17              
  Lines         417      425       +8     
  Branches      111      113       +2     
==========================================
+ Hits          324      332       +8     
  Misses         92       92              
  Partials        1        1              
Files Coverage Δ
lib/dav/dav.ts 61.53% <ø> (ø)
lib/files/node.ts 100.00% <100.00%> (ø)
lib/files/nodeData.ts 100.00% <100.00%> (ø)

Signed-off-by: Daniel Kesselberg <[email protected]>
@skjnldsv skjnldsv merged commit d3ae6ca into nextcloud-libraries:master Oct 3, 2023
@skjnldsv skjnldsv added type: enhancement 🚀 New feature or request 3. to review 3️⃣ Waiting for reviews labels Oct 3, 2023
@kesselb kesselb deleted the encode-hashtag branch October 3, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review 3️⃣ Waiting for reviews type: enhancement 🚀 New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants