From cc9a1543b899d59fbc6db8dcdbd4122d910f25e6 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Tue, 22 Nov 2011 22:26:50 +0000 Subject: shouldn't be adding one to the offset to detect subdirs --- src/trg-torrent-model.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/trg-torrent-model.c') diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c index b69c524..fb60c37 100644 --- a/src/trg-torrent-model.c +++ b/src/trg-torrent-model.c @@ -204,7 +204,6 @@ static gboolean trg_torrent_model_reload_dir_alises_foreachfunc( -1); shortDownloadDir = shorten_download_dir((TrgClient*) gdata, downloadDir); - g_message("%s", shortDownloadDir); gtk_list_store_set(GTK_LIST_STORE(model), iter, TORRENT_COLUMN_DOWNLOADDIR_SHORT, shortDownloadDir, -1); @@ -293,7 +292,7 @@ gchar *shorten_download_dir(TrgClient *tc, const gchar *downloadDir) { if (*(downloadDir + offset) == '/') offset++; - if (offset + 1 < strlen(downloadDir)) + if (offset < strlen(downloadDir)) return g_strdup(downloadDir + offset); } } -- cgit v1.2.3