diff --git a/libgphoto2/gphoto2-filesys.c b/libgphoto2/gphoto2-filesys.c index 22c13c10f..27e79e37c 100644 --- a/libgphoto2/gphoto2-filesys.c +++ b/libgphoto2/gphoto2-filesys.c @@ -528,8 +528,8 @@ gp_filesystem_folder_number (CameraFilesystem *fs, const char *folder, CR (x = gp_filesystem_folder_number (fs, buf, context)); if (!fs->folder[x].folders_dirty) { gp_context_error (context, - _("Folder '%s' does not contain a folder '%s'."), - buf, folder + strlen (buf) + 1); + _("Folder '%s' does not contain a folder '%s'."), buf, + folder + strlen (buf) + ((strlen (buf) == 1) ? 0 : 1)); return (GP_ERROR_DIRECTORY_NOT_FOUND); }