[Pidgin] #9532: Logging of this conversation failed - caused by username

Pidgin trac at pidgin.im
Wed Feb 3 12:30:53 EST 2010


#9532: Logging of this conversation failed - caused by username
----------------------------+-----------------------------------------------
 Reporter:  gerhard.tinned  |        Owner:           
     Type:  defect          |       Status:  new      
Milestone:                  |    Component:  libpurple
  Version:  2.5.6           |   Resolution:           
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by sadrul):

 '.' is not an illegal character. So it doesn't need escaping. However, in
 windows, file/directory names cannot end in periods or spaces
 (http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx). I
 think they treat it as a feature ;)

 The following patch will fix the issue in libpurple:
 {{{
 #
 # old_revision [2372295461cdcf2b479cc7cda6be083993d9ddae]
 #
 # patch "libpurple/util.c"
 #  from [d1771bfbcbd754eb92de800a43f7a102cc85ec99]
 #    to [c8ed4d017bb67127743ea42bbf3a43c347843b89]
 #
 ============================================================
 --- libpurple/util.c    d1771bfbcbd754eb92de800a43f7a102cc85ec99
 +++ libpurple/util.c    c8ed4d017bb67127743ea42bbf3a43c347843b89
 @@ -5021,7 +5021,13 @@ purple_escape_filename(const char *str)
                         }
                 }
         }
 -
 +#ifdef _WIN32
 +       /* File/Directory names in windows cannot end in periods/spaces.
 +        * http://msdn.microsoft.com/en-
 us/library/aa365247%28VS.85%29.aspx
 +        */
 +       while (j > 0 && (buf[j - 1] == '.' || buf[j - 1] == ' '))
 +               j--;
 +#endif
         buf[j] = '\0';

         return buf;
 }}}

 glib probably needs this fix in g_build_filename (and probably other
 places).

-- 
Ticket URL: <http://developer.pidgin.im/ticket/9532#comment:5>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list