'dir' not initialized if group has no messages
authorThorsten Maerz <torte@netztorte.de>
Sat, 31 Jan 2004 11:40:59 +0000 (11:40 +0000)
committerThorsten Maerz <torte@netztorte.de>
Sat, 31 Jan 2004 11:40:59 +0000 (11:40 +0000)
ChangeLog.claws
configure.ac
src/news.c

index 61d21f75dbb2c2b6c942b3b946a1510032dc950f..c201f2cb205a2938a89fea39eca4fdad1253df56 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-31 [thorsten]  0.9.8claws60
+
+       * src/news.c
+               'dir' not initialized if group has no messages
+
 2004-01-29 [christoph] 0.9.8claws59
 
        * src/customheader.[ch]
index b4ab21cf78e08f72ac3647764fdbec2b125ec8d0..42f6209bdb38b2caf7344e2b4f71b6d46902ccea 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=59
+EXTRA_VERSION=60
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 8cd1c0b8e2a3210c41582de4b8943b3c0c841fdf..d8665c86babd309ce8e8fd6e256215d79a61c01f 100644 (file)
@@ -808,25 +808,22 @@ gint news_get_num_list(Folder *folder, FolderItem *item, GSList **msgnum_list, g
                return -1;
        }
 
-       if (num <= 0) {
+       dir = news_folder_get_path(folder);
+       if (num <= 0)
                remove_all_numbered_files(dir);
-               return 0;
-       }
-
-       if(last < first) {
+       else if(last < first)
                log_warning(_("invalid article range: %d - %d\n"),
                            first, last);
-               return 0;
-       }
-
-       for(i = first; i <= last; i++) {
-               *msgnum_list = g_slist_prepend(*msgnum_list, GINT_TO_POINTER(i));
-               nummsgs++;
+       else {
+               for(i = first; i <= last; i++) {
+                       *msgnum_list = g_slist_prepend(*msgnum_list, 
+                                                      GINT_TO_POINTER(i));
+                       nummsgs++;
+               }
+               debug_print("removing old messages from %d to %d in %s\n",
+                           first, last, dir);
+               remove_numbered_files(dir, 1, first - 1);
        }
-
-       dir = folder_item_get_path(item);
-       debug_print("removing old messages from %d to %d in %s\n", first, last, dir);
-       remove_numbered_files(dir, 1, first - 1);
        g_free(dir);
 
        return nummsgs;