From ddae394534d804babf3809214a76224f415e55c0 Mon Sep 17 00:00:00 2001 From: Robert Vokac Date: Wed, 1 May 2024 18:56:58 +0200 Subject: [PATCH] Fixed several small issues --- .gitignore | 3 +++ .../java/org/nanoboot/bitbackup/commands/CheckCommand.java | 2 +- .../java/org/nanoboot/bitbackup/commands/HelpCommand.java | 2 +- .../impl/sqlite/SystemItemRepositoryImplSqlite.java | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3d5fb8b..8bbc5fb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ /target/ /nbproject/ +*nbactions.xml +.bib.sqlite3** + diff --git a/src/main/java/org/nanoboot/bitbackup/commands/CheckCommand.java b/src/main/java/org/nanoboot/bitbackup/commands/CheckCommand.java index 465c9b6..46ba01c 100644 --- a/src/main/java/org/nanoboot/bitbackup/commands/CheckCommand.java +++ b/src/main/java/org/nanoboot/bitbackup/commands/CheckCommand.java @@ -453,7 +453,7 @@ public class CheckCommand implements Command { LOG.info("Part {}: Updating files - content and last modification date were changed: {}", CheckCommandPart.COMPARE_CONTENT_AND_LAST_MODTIME.number, contentAndModTimeWereChanged); - LOG.info("Part {}: Updating files - content and last modification date were not changed): {}", + LOG.info("Part {}: Updating files - content and last modification date were not changed: {}", CheckCommandPart.COMPARE_CONTENT_AND_LAST_MODTIME.number, filesToUpdateLastCheckDate.size()); bibContext.getFileRepository().updateLastCheckDate(now.toString(), filesToUpdateLastCheckDate); diff --git a/src/main/java/org/nanoboot/bitbackup/commands/HelpCommand.java b/src/main/java/org/nanoboot/bitbackup/commands/HelpCommand.java index cc2edf0..225973d 100644 --- a/src/main/java/org/nanoboot/bitbackup/commands/HelpCommand.java +++ b/src/main/java/org/nanoboot/bitbackup/commands/HelpCommand.java @@ -45,7 +45,7 @@ public class HelpCommand implements Command { SYNOPSIS bib [command] [options] - If no command is provided, then the default command check is used. This means, if you run "bit-backup", it is the same, as to run "bib check". + If no command is provided, then the default command check is used. This means, if you run "bib", it is the same, as to run "bib check". DESCRIPTION Detects bit rotten files in the given directory to keep your files forever. diff --git a/src/main/java/org/nanoboot/bitbackup/persistence/impl/sqlite/SystemItemRepositoryImplSqlite.java b/src/main/java/org/nanoboot/bitbackup/persistence/impl/sqlite/SystemItemRepositoryImplSqlite.java index a8939c7..65d4cbf 100644 --- a/src/main/java/org/nanoboot/bitbackup/persistence/impl/sqlite/SystemItemRepositoryImplSqlite.java +++ b/src/main/java/org/nanoboot/bitbackup/persistence/impl/sqlite/SystemItemRepositoryImplSqlite.java @@ -143,8 +143,8 @@ public class SystemItemRepositoryImplSqlite implements SystemItemRepository { String sql = sb.toString(); try ( - Connection connection = sqliteConnectionFactory.createConnection(); PreparedStatement stmt = connection.prepareStatement(sql);) { - + Connection connection = sqliteConnectionFactory.createConnection(); PreparedStatement stmt = connection.prepareStatement(sql)) { + stmt.setString(1, key); stmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage());