From: <zu...@gm...> - 2023-07-14 19:51:55
|
I don't think it ever worked, it's a To Do in the code at line 1036 :) Someone should open a bug report about this, maybe someone will pick it up in the future and fix it. I'm not gonna bother with it as I hate GTK code now. In your case, there is other ways to achieve it. you could replace mp4 to mp Or you can use Replace with Regular expression : replace 4$ with nothing Just for reference, here's the code : # Insert if ( $insert_radio->get_active and $insert_entry->get_text ne '' ) { my $insert_at = $insert_spin->get_value_as_int(); # TODO: There is an off by one insert here. # If $insert_at == -1, we should insert the text at the end. Not 1 from the end. # This is because there is no such thing as "-0". if ( $insert_at > length($new_name) or $insert_at < (length($new_name)-(length($new_name)*2)) ) { $insert_at = length($new_name); } my $tmp_string1 = substr( $new_name, 0, $insert_at ); my $tmp_string2 = substr( $new_name, $insert_at, length($new_name) ); $new_name = $tmp_string1 . $insert_entry->get_text . $tmp_string2; } # Delete elsif ( $delete_radio->get_active ) { my $delete_to = $delete_btw2_spin->get_value_as_int(); my $delete_from = $delete_btw1_spin->get_value_as_int(); # TODO: Same off by one issue as in Insert. if ( $delete_to > length($new_name) or $delete_to < (length($new_name)-(length($new_name)*2)) ) { $delete_to = length($new_name); } my $tmp_string1 = substr( $new_name, 0, $delete_from ); my $tmp_string2 = substr( $new_name, $delete_to, length($new_name) ); $new_name = $tmp_string1 . $tmp_string2; } On 2023-07-12 19:40, Mario Mey wrote: > > Hi, there. If I want to remove the last character of the file name, I > supposed to use negative numbers to achieve that. But, instead of > doing that, it duplicate characters. Like this capture: > > Also, by using positive numbers in the second field, it duplicates > that number of characters: > > Is this a bug? Is there any other way to achieve it? > > Thanks. > > > > _______________________________________________ > Gprename-users mailing list > Gpr...@li... > https://lists.sourceforge.net/lists/listinfo/gprename-users |