Skip to content

Commit 0ea6986

Browse files
committed
test: use path.join for database file cleanup helper
1 parent 221cbed commit 0ea6986

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

integration_test/components/database_file_helper.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import 'dart:io';
22

3+
import 'package:path/path.dart' as p;
4+
35
class DatabaseFileHelper {
46
static const _walExtension = '-wal';
57
static const _shmExtension = '-shm';
@@ -9,9 +11,9 @@ class DatabaseFileHelper {
911
/// Swallows any [FileSystemException] to ensure test teardown doesn't crash.
1012
static Future<void> deleteDatabaseFiles({required String directoryPath, required String dbName}) async {
1113
try {
12-
await _deleteFile('$directoryPath/$dbName');
13-
await _deleteFile('$directoryPath/$dbName$_walExtension');
14-
await _deleteFile('$directoryPath/$dbName$_shmExtension');
14+
await _deleteFile(p.join(directoryPath, dbName));
15+
await _deleteFile(p.join(directoryPath, '$dbName$_walExtension'));
16+
await _deleteFile(p.join(directoryPath, '$dbName$_shmExtension'));
1517
} catch (_) {
1618
// Ignore cleanup errors during test teardown
1719
}

0 commit comments

Comments
 (0)