g_path_get_basename returns last directoryname if there is a "/" at the end?



Is this really the way it should work?

g_path_get_basename("/home/ftp/pub/files/")

returns: g_strdup("files")

imho. if there is a slash(/) at the end it should return g_strdup("")

and only g_path_get_basename("/home/ftp/pub/files/filename") should return
g_strdup("filename")

see what I mean? :-)

Greets

M.H.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]