Remove space between -o and output filename so it works on older versions
[mmh] / sbr / folder_read.c
index b5b3f9d..6cd0d10 100644 (file)
@@ -57,7 +57,7 @@ folder_read (char *name)
     mp->numsel = 0;
     mp->nummsg = 0;
 
-    if (access (name, W_OK) == -1 || st.st_uid != getuid())
+    if (access (name, W_OK) == -1)
        set_readonly (mp);
     prefix_len = strlen(BACKUP_PREFIX);
 
@@ -70,7 +70,7 @@ folder_read (char *name)
        adios (NULL, "unable to allocate storage");
 
     while ((dp = readdir (dd))) {
-       if ((msgnum = m_atoi (dp->d_name))) {
+       if ((msgnum = m_atoi (dp->d_name)) && msgnum > 0) {
            /*
             * Check if we need to allocate more
             * temporary elements for message names.