Index: gui.h
===================================================================
--- gui.h	(revision 72)
+++ gui.h	(working copy)
@@ -146,7 +146,10 @@
       virtual void do_unsubscribe_selected_groups ();
       virtual void do_set_charset (const char *);
 
+    public:
+      static std::string prompt_user_for_save_path (GtkWindow * parent, const Prefs& prefs);
 
+
     private: // Queue::Listener
       friend class Queue;
       virtual void on_queue_task_active_changed (Queue&, Task&, bool active);
Index: pan.cc
===================================================================
--- pan.cc	(revision 74)
+++ pan.cc	(working copy)
@@ -189,13 +189,10 @@
 
   bool gui(true), nzb(false);
   std::string url;
+  std::string nzb_output_path;
   typedef std::vector<std::string> strings_t;
   strings_t nzb_files;
 
-  char * pch = g_get_current_dir ();
-  std::string nzb_output_path = pch;
-  g_free (pch);
-
   for (int i=1; i<argc; ++i)
   {
     const char * tok (argv[i]);
@@ -221,12 +218,6 @@
     }
   }
 
-#if 0
-  if (nzb && nzb_files.empty()) {
-    std::cerr << _("Error: nzb arguments used without nzb files.") << std::endl;
-    return 0;
-  }
-#endif
   if (!gui && nzb_files.empty() && url.empty()) {
     std::cerr << _("Error: --no-gui used without nzb files or news:message-id.") << std::endl;
     return 0;
@@ -259,6 +250,13 @@
 
     if (nzb)
     {
+      // if no save path was specified, either prompt for one or
+      // use the user's home directory as a fallback.
+      if (nzb_output_path.empty() && gui)
+        nzb_output_path = GUI::prompt_user_for_save_path (NULL, prefs);
+      if (nzb_output_path.empty())
+        nzb_output_path = g_get_home_dir ();
+
       // load the nzb files...
       std::vector<Task*> tasks;
       foreach_const (strings_t, nzb_files, it)
Index: gui.cc
===================================================================
--- gui.cc	(revision 72)
+++ gui.cc	(working copy)
@@ -475,32 +475,33 @@
 namespace
 {
   static std::string prev_path;
+}
 
-  std::string get_save_attachments_path_from_user (GtkWindow * parent, const Prefs& prefs)
-  {
-    if (prev_path.empty())
-      prev_path = prefs.get_string ("default-save-attachments-path", g_get_home_dir ());
-    if (!file :: file_exists (prev_path.c_str()))
-      prev_path = g_get_home_dir ();
+std::string
+GUI :: prompt_user_for_save_path (GtkWindow * parent, const Prefs& prefs)
+{
+  if (prev_path.empty())
+    prev_path = prefs.get_string ("default-save-attachments-path", g_get_home_dir ());
+  if (!file :: file_exists (prev_path.c_str()))
+    prev_path = g_get_home_dir ();
 
-    GtkWidget * w = gtk_file_chooser_dialog_new (_("Save Attachments"), parent,
-                                                 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
-                                                 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                                 GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
-                                                 NULL);
-    gtk_dialog_set_default_response (GTK_DIALOG(w), GTK_RESPONSE_ACCEPT);
-    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(w), prev_path.c_str());
-    const int response (gtk_dialog_run (GTK_DIALOG(w)));
-    std::string path;
-    if (response == GTK_RESPONSE_ACCEPT) {
-      char * tmp = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (w));
-      prev_path = path = tmp;
-      g_free (tmp);
-    }
+  GtkWidget * w = gtk_file_chooser_dialog_new (_("Save Attachments"), parent,
+                                               GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+                                               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                               GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+                                               NULL);
+  gtk_dialog_set_default_response (GTK_DIALOG(w), GTK_RESPONSE_ACCEPT);
+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(w), prev_path.c_str());
+  const int response (gtk_dialog_run (GTK_DIALOG(w)));
+  std::string path;
+  if (response == GTK_RESPONSE_ACCEPT) {
+    char * tmp = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (w));
+    prev_path = path = tmp;
+    g_free (tmp);
+  }
 
-    gtk_widget_destroy(w);
-    return path;
-  }
+  gtk_widget_destroy(w);
+  return path;
 }
 
 void GUI :: do_save_articles ()
@@ -552,7 +553,7 @@
   // if we're importing files, build the tasks...
   std::vector<Task*> tasks;
   if (!filenames.empty()) {
-    const std::string path (get_save_attachments_path_from_user (get_window(_root), _prefs));
+    const std::string path (prompt_user_for_save_path (get_window(_root), _prefs));
     if (!path.empty())
       foreach_const (strings_t, filenames, it)
         NZB :: tasks_from_nzb_file (*it, path, _cache, _data, _data, _data, tasks);
