|
View unanswered posts | View active topics
It is currently Sat May 25, 2013 6:54 pm
|
Page 1 of 1
|
[ 6 posts ] |
|
[SOLVED] Bug in rename module
| Author |
Message |
|
gallier2
Passerby
Joined: Fri Aug 26, 2011 8:46 am Posts: 7
|
 [SOLVED] Bug in rename module
Hello Movienizer team, thank you for your outstanding program.
I noticed an annoying bug in the rename module. I don't know if I should put the message here in the Bug section or in the plugin section, don't hesitate to move this message there if I chose the wrong one.
Here the bug: as I am French, I use movienizer to handle a lot of french movies. The french language uses the apostrophe (') a lot for the titles so this bug happens a lot. It can also happen in english titles, as the apostrophe is sometimes used there aswell. The renaming plugin fails (silently) to rename files containing that character, but updates the database most of the time. This has the consequence of desynchronizing the database with the filesystem. I managed to circumvent the problem by removing the ' from the titles, but that creates other problems and is really ugly looking.
I suppose (as I'm a programmer too) that the bug comes from an improper handling of quotes in the generated SQL strings, which uses that character as a string delimiter. I know from Oracle SQL that the character has to be doubled in strings to get correctly handled. Example: Title L'indomptable SQL ...AND title='L''indomptable' AND...
I don't know if the SQL engine you use has the same syntax, but I suppose the bug to be quite similar.
Thank you for your time.
Last edited by gallier2 on Thu Sep 01, 2011 11:37 am, edited 1 time in total.
|
| Fri Aug 26, 2011 9:12 am |
|
 |
|
Vlad
Developer
Joined: Wed Jan 23, 2008 11:37 am Posts: 2498
|
 Re: Bug in rename module
Do you use the latest version of the file rename plugin (it should show 3.2 in its title)?
_________________ 
|
| Mon Aug 29, 2011 1:19 pm |
|
 |
|
gallier2
Passerby
Joined: Fri Aug 26, 2011 8:46 am Posts: 7
|
 Re: Bug in rename module
Yes, I tested it yesterday evening with the 3.2 module and the result was the same. As long as the filename contains a quote character ' ' the rename module fails to move the file and update its database entry.
As I said in my first message and owing to my long experience as a programmer, the error comes probably from an incorrect escaping of quotes in the building of the SQL statement used to update the database. I might be wrong though as I do not know how your app is built.
|
| Tue Aug 30, 2011 7:07 am |
|
 |
|
Vlad
Developer
Joined: Wed Jan 23, 2008 11:37 am Posts: 2498
|
 Re: Bug in rename module
Just tried, it worked fine for me  Tried on several movies containing apostrophe in their titles, and also with the title specified by you: L'indomptable. No problem at all. Is it possible that some other character is used in the place of the standard ' ?
_________________ 
|
| Tue Aug 30, 2011 6:41 pm |
|
 |
|
Vlad
Developer
Joined: Wed Jan 23, 2008 11:37 am Posts: 2498
|
 Re: Bug in rename module
Did you manage to find out what the problem was? It's pretty strange, as the quote character is properly escaped in the code, and it works for me. So, now it's a question why it does not work for you. 
_________________ 
|
| Wed Aug 31, 2011 4:06 pm |
|
 |
|
gallier2
Passerby
Joined: Fri Aug 26, 2011 8:46 am Posts: 7
|
 Re: Bug in rename module
Ok, I retried a massive rename and I have to admit that the problem is solved with the 3.2 renamer. When I tried yesterday there were several files that were not moved to the new directory, but after closer inspection today, these files were of already orphaned files (i.e. their path in the database and the path they were stored in were differing, probably due to the bug in the older renamer). After testing different massive renames I couldn't reproduce the problem either. So it looks like the bug was solved by the last update. Thank you for your time.
|
| Wed Aug 31, 2011 9:14 pm |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|