even simplier tests

This commit is contained in:
Damian Lesiuk 2025-10-01 21:59:27 +02:00
parent 50b6351b39
commit 97c365cb05
5 changed files with 48 additions and 108 deletions

View file

@ -98,5 +98,6 @@ String? punycodeDecodeUrl(String? serverUrl) {
/// - If slug is present: 's/${sharedLink.slug}'
/// - Otherwise: 'share/${sharedLink.key}'
String getShareUrlPath(SharedLink sharedLink) {
return sharedLink.slug != null ? 's/${sharedLink.slug}' : 'share/${sharedLink.key}';
final slug = sharedLink.slug?.trim();
return slug?.isNotEmpty == true ? 's/$slug' : 'share/${sharedLink.key}';
}