Skip to content

Commit

Permalink
fix: download files starting with "null/"
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Dec 10, 2023
1 parent 7b5c1ef commit 137077b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/data/nextcloud/file_syncer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,16 @@ abstract class FileSyncer {
} // TODO: also sync config.sbc

// decrypt file path
final localPath = await workerManager.execute(
String localPath = await workerManager.execute(
() => encrypter.decrypt16(encryptedName, iv: iv),
priority: WorkPriority.veryHigh,
);

// Mitigates a bug where files got imported starting with `null/` instead of `/`.
if (localPath.startsWith('null/')) {
localPath = localPath.substring('null/'.length - 1);
}

final syncFile = SyncFile(
encryptedName: encryptedName,
localPath: localPath,
Expand Down

0 comments on commit 137077b

Please sign in to comment.