[easytag/wip/win32: 3/3] Remove unused Windows backslash removal function



commit 9a2c766e9c27467c8a2607635674fee021ca9db1
Author: David King <amigadave amigadave com>
Date:   Fri Jan 15 20:26:00 2016 +0000

    Remove unused Windows backslash removal function
    
    As GFile does trivial canonicalization of paths, such as removing a
    trailing slash, there is no reason to handle a path from a GFile
    specially under Windows.

 src/browser.c        |    4 ----
 src/win32/win32dep.c |   11 -----------
 src/win32/win32dep.h |    3 ---
 3 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 1df8575..4c6aa36 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -4553,10 +4553,6 @@ Run_Program_With_Directory (EtBrowser *self)
     program_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN 
(priv->open_directory_with_combobox)))));
     current_directory = g_object_get_data (G_OBJECT (priv->open_directory_with_combobox),
                                            "Current_Directory");
-#ifdef G_OS_WIN32
-    /* On win32 : 'winamp.exe "c:\path\to\dir"' succeed, while 'winamp.exe "c:\path\to\dir\"' fails */
-    ET_Win32_Path_Remove_Trailing_Backslash(current_directory);
-#endif /* G_OS_WIN32 */
 
     // List of parameters (here only one! : the current directory)
     args_list = g_list_append(args_list,current_directory);
diff --git a/src/win32/win32dep.c b/src/win32/win32dep.c
index 35ca813..6e1a0e9 100644
--- a/src/win32/win32dep.c
+++ b/src/win32/win32dep.c
@@ -125,17 +125,6 @@ et_w32_mkstemp (gchar *template)
 }
 #endif /* !HAVE_MKSTEMP */
 
-/* Remove trailing '\' if any, but not when 'C:\' */
-void ET_Win32_Path_Remove_Trailing_Backslash (gchar *path)
-{
-    int path_len = strlen(path);
-  
-    if(path_len > 3 && path[path_len - 1] == '\\')
-    {
-        path[path_len - 1] = '\0';
-    }
-}
-
 #ifndef HAVE_TRUNCATE
 gint
 et_w32_truncate (const gchar *path, off_t length)
diff --git a/src/win32/win32dep.h b/src/win32/win32dep.h
index 939e6ae..abb180c 100644
--- a/src/win32/win32dep.h
+++ b/src/win32/win32dep.h
@@ -48,9 +48,6 @@ G_BEGIN_DECLS
 /* Determine EasyTAG paths */
 const gchar * weasytag_locale_dir (void);
 
-/* Misc */
-extern void  ET_Win32_Path_Remove_Trailing_Backslash (gchar *path);
-
 #ifndef HAVE_MKSTEMP
 #define et_w32_mkstemp mkstemp
 extern gint et_w32_mkstemp (char *template);


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