[Easytag-mailing] Patch for EasyTAG 0.24 ( -> 0.24a )
- From: Jérôme Couderc <j couderc ifrance com>
- To: easytag-mailing lists sourceforge net
- Subject: [Easytag-mailing] Patch for EasyTAG 0.24 ( -> 0.24a )
- Date: Sat Sep 21 13:10:05 2002
Hi to all,
You've probably noted that a problem may occurs when renaming files or directories. Indeed, a message informing that the file or the directory appears some times. Nothing serious but just boring...
So here is a patch that fixes the problem
Sincerely,
Jerome
--
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]