Re: [Easytag-mailing] Error On Multiple Tagging & Renaming



Hi,

I've also the same problem, and the attached patch would fix the problem.

Sincerely,
Jerome


Alan Swanson wrote:

I having a problem when changing the tags and renaming a group of files.

If you chose to save all files, and tick for repeat action on both tags
and filename, then for the second and subsequent files it gives the
error;

"Can't rename OLD.ogg because the following file already exists:
NEW.ogg"

But it doesn't exist yet. The first file is retagged and renamed fine,
while all the other files have been only retagged, but not renamed after
okaying this error dialog.

However if it's a name change only then it's fine. Ie, when you repeat
the save all files after these errors.

Otherwise I've been finding Easytag extremely useful, thanks.


--
EasyTAG - Tag editor for MP3 and OGG files
http://easytag.sourceforge.net
--
Jerome COUDERC <j couderc ifrance com>

diff -ruN easytag-0.24/configure easytag-0.24a/configure
--- easytag-0.24/configure	Sat Sep 14 22:01:21 2002
+++ easytag-0.24a/configure	Sat Sep 21 21:36:34 2002
@@ -1373,7 +1373,7 @@
 
 
 PACKAGE=easytag
-VERSION=0.24
+VERSION=0.24a
 
 ALL_LINGUAS="cs de es fr hu it ja nl pl ru sv uk"
 
diff -ruN easytag-0.24/configure.in easytag-0.24a/configure.in
--- easytag-0.24/configure.in	Fri Sep 13 23:08:39 2002
+++ easytag-0.24a/configure.in	Sat Sep 21 21:36:37 2002
@@ -3,7 +3,7 @@
 
 dnl from gettext
 PACKAGE=easytag
-VERSION=0.24
+VERSION=0.24a
 
 dnl -------------------------------
 dnl Translation files
diff -ruN easytag-0.24/easytag.spec easytag-0.24a/easytag.spec
--- easytag-0.24/easytag.spec	Sat Sep 14 22:01:45 2002
+++ easytag-0.24a/easytag.spec	Sat Sep 21 21:36:35 2002
@@ -1,5 +1,5 @@
 %define    name      easytag
-%define    version   0.24
+%define    version   0.24a
 %define    release   1
 %define    prefix    /usr
 
diff -ruN easytag-0.24/src/browser.c easytag-0.24a/src/browser.c
--- easytag-0.24/src/browser.c	Fri Sep 13 23:41:08 2002
+++ easytag-0.24a/src/browser.c	Sat Sep 21 21:41:01 2002
@@ -1594,6 +1594,7 @@
 }
 void Rename_Directory (GtkObject *combobox)
 {
+    DIR   *dir;
     gchar *directory_parent;
     gchar *directory_last_name;
     gchar *directory_new_name;
@@ -1601,7 +1602,6 @@
     gchar *tmp_path;
     gchar *new_path;
     gchar *tmp_path_string;
-    struct stat statbuf;
 
 
     if (!GTK_IS_COMBO(combobox)) return;
@@ -1635,8 +1635,7 @@
     new_path  = g_strconcat(directory_parent,directory_new_name,NULL);
 
     /* Check if the new directory name doesn't already exists, and detect if it's only a case change (needs for vfat) */
-    stat(new_path,&statbuf);
-    if ( S_ISDIR(statbuf.st_mode) && strcasecmp(last_path,new_path)!=0 )
+    if ( (dir=opendir(new_path))!=NULL && strcasecmp(last_path,new_path)!=0 )
     {
         gchar *msg;
         GtkWidget *msgbox;
diff -ruN easytag-0.24/src/easytag.c easytag-0.24a/src/easytag.c
--- easytag-0.24/src/easytag.c	Fri Sep 13 23:41:08 2002
+++ easytag-0.24a/src/easytag.c	Sat Sep 21 21:39:23 2002
@@ -1187,16 +1187,15 @@
 }
 void Rename_File (void)
 {
+    FILE  *file;
     gchar *tmp_filename = NULL;
     gchar *tmp_filename_string = NULL;
-    struct stat statbuf;
     gchar *cur_filename = ((File_Name *)((ET_File *)ETFileList->data)->FileNameCur->data)->value;
     gchar *new_filename = ((File_Name *)((ET_File *)ETFileList->data)->FileNameNew->data)->value;
 
     Statusbar_Message(_("Renaming file(s)..."),TRUE);
     /* Check if a file already exists with the new name, and detect if it's only a case change (needs for vfat) */
-    stat(new_filename,&statbuf);
-    if ( S_ISREG(statbuf.st_mode) && strcasecmp(cur_filename,new_filename)!=0 )
+    if ( (file=fopen(new_filename,"r"))!=NULL && strcasecmp(cur_filename,new_filename)!=0 )
     {
         gchar *msg;
         GtkWidget *msgbox;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]