(trunk, libT) #4160 'foreign character support' -- merge mike.dld's 4160-02b-path.patch, which updates the codebase to use the new tr_sys_path_*() portability wrappers introduced in 4160-02a

This commit is contained in:
Jordan Lee
2014-07-08 00:08:43 +00:00
parent d7f4478679
commit 0323639e57
26 changed files with 235 additions and 386 deletions

View File

@@ -13,7 +13,7 @@
#include <string.h>
#include <libtransmission/transmission.h>
#include <libtransmission/utils.h> /* tr_is_same_file () */
#include <libtransmission/file.h> /* tr_sys_path_is_same () */
#include "conf.h"
#include "file-list.h"
@@ -188,7 +188,7 @@ sourceChanged (GtkFileChooserButton * b, gpointer gdata)
int duplicate_id = 0;
tr_torrent * torrent;
if (filename && (!o->filename || !tr_is_same_file (filename, o->filename)))
if (filename && (!o->filename || !tr_sys_path_is_same (filename, o->filename, NULL)))
{
g_free (o->filename);
o->filename = g_strdup (filename);
@@ -229,7 +229,7 @@ downloadDirChanged (GtkFileChooserButton * b, gpointer gdata)
struct OpenData * data = gdata;
char * fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (b));
if (fname && (!data->downloadDir || !tr_is_same_file (fname, data->downloadDir)))
if (fname && (!data->downloadDir || !tr_sys_path_is_same (fname, data->downloadDir, NULL)))
{
g_free (data->downloadDir);
data->downloadDir = g_strdup (fname);