diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-11-22 22:26:50 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-11-22 22:26:50 +0000 |
commit | cc9a1543b899d59fbc6db8dcdbd4122d910f25e6 (patch) | |
tree | 9417dbd3f567b9b10158477694751bea3ffc8eba | |
parent | c02d88a6532f5f96211ed4410dadf4bc6ae1b094 (diff) |
shouldn't be adding one to the offset to detect subdirs
-rw-r--r-- | src/trg-torrent-model.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); } } |