public bool renameFolderPaths(string oldPath, string newPath) { if (this.readOnly) { return(false); } try { SQLiteCommand command = new SQLiteCommand("UPDATE `FileNodes` SET `path` = replace(`path`, @oldPath, @newPath), `parentpath` = replace(`parentpath`, @oldPath, @newPath) WHERE `path` LIKE @searchPath;", this.dbConnector.connection); command.Parameters.AddWithValue("@oldPath", oldPath); command.Parameters.AddWithValue("@newPath", newPath); command.Parameters.AddWithValue("@searchPath", oldPath + "%"); command.ExecuteNonQuery(); Console.WriteLine(DBConnector.ToReadableString(command)); this.filterOutOfDate += 5; } catch (System.Data.SQLite.SQLiteException se) { if (se.ErrorCode == DBConnector.DatabaseIsLocked) { this.readOnly = true; return(false); } } return(true); }