diff -rbu sound-juicer/src/sj-extracting.c my-sj/src/sj-extracting.c
--- sound-juicer/src/sj-extracting.c	2006-10-23 15:22:23.000000000 -0400
+++ my-sj/src/sj-extracting.c	2006-11-13 01:24:06.000000000 -0500
@@ -110,7 +110,8 @@
 build_filename (const TrackDetails *track)
 {
   GnomeVFSURI *uri, *new;
-  char *realfile, *realpath, *filename, *string;
+  char *realpath, *filename, *string;
+  GString *realfile;
   GMAudioProfile *profile;
 
   g_object_get (extractor, "profile", &profile, NULL);
@@ -122,11 +123,29 @@
   gnome_vfs_uri_unref (uri); uri = new;
   g_free (realpath);
 
-  realfile = filepath_parse_pattern (file_pattern, track);
-  filename = g_strdup_printf("%s.%s", realfile, gm_audio_profile_get_extension(profile));
+  realfile = g_string_new(filepath_parse_pattern (file_pattern, track));
+  /* We have problems with filenames larger than 255 bytes
+   * This leaves enough for the file extension as well */
+  if (realfile->len > 250)
+  {
+	GtkWidget *dialog;
+	gchar *message;
+  	g_string_truncate(realfile, 250);
+	message = g_strdup_printf("Track %d has too long of a filename, and has been shortend to:\n %s",
+				   					track->number, realfile->str);
+	dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), 0,
+									 GTK_MESSAGE_ERROR,
+									 GTK_BUTTONS_CLOSE,
+									 message);
+	gtk_dialog_run (dialog);
+	gtk_widget_destroy (dialog);
+	g_free (message);
+  }
+  filename = g_strdup_printf("%s.%s", realfile->str, gm_audio_profile_get_extension(profile));
   new = gnome_vfs_uri_append_file_name (uri, filename);
   gnome_vfs_uri_unref (uri); uri = new;
-  g_free (filename); g_free (realfile);
+  g_free (filename);
+  g_string_free (realfile, TRUE);
 
   string = gnome_vfs_uri_to_string (uri, 0);
   gnome_vfs_uri_unref (uri);
