Bug 108429 - K3B informs the user of filenames beeing too long when it's too late
Summary: K3B informs the user of filenames beeing too long when it's too late
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-02 12:08 UTC by Christoph Wiesen
Modified: 2006-04-11 14:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Wiesen 2005-07-02 12:08:51 UTC
Version:           0.11.23 (using KDE 3.4.1, Kubuntu Package 4:3.4.1-0ubuntu0hoary1 ())
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)
OS:                Linux (i686) release 2.6.10-5-k7

Well ok, we all know certain file systems have certain restrictions on how long a file name can be. That's fine. Users don't always see at first glance how long the names of the files they burn on a CD actually are. So K3B as well as any other burning utility informs the user about this mishap.

Only problem: K3B does this when burning already began. it says
"Some filenames need to be shortened due to the 64 char restrictionof the Joliet...".

So basically it just informs the user about "you didn't pay attention so I fixed that" - not nice.

Maybe it's possible to have this information in a saner place, like when the user first presse "burn" before he is prompted to insert a blank media.
Comment 1 Christoph Wiesen 2005-09-11 15:45:31 UTC
There's no newer k3b package for my distribution since I reported the bug but since it's still "UNCONFIRMED" I suppose it hasn't been possible to fix it yet.
Anything yet? Or is there some better way I can report bugs so that they will come to the attention of k3b developers?

If there's something else to do besides fixing it myself (which I simply can't) just tell me.
Comment 2 Shriramana Sharma 2006-01-30 08:57:12 UTC
I found a duplicate (but do not have the rights to mark it so) -

Bug 85300: if filename is longer than allowed joliet length, give warning instead of just cut them off

This bug is more descriptive. And this is technically a wishlist but the user-perceived seriousness of what would happen if this wish is not fulfilled soon makes it a bug.

I second this request. Only because I was attentive to the window was I able to cancel the burning before I had a DVD with amputated filenames.
Comment 3 Sebastian Trueg 2006-01-31 09:33:05 UTC
this has been fixed in 0.12.x
Comment 4 Sebastian Trueg 2006-01-31 09:33:18 UTC
*** Bug has been marked as fixed ***.
Comment 5 Shriramana Sharma 2006-01-31 15:25:09 UTC
Negative, I have this problem in 0.12.8 on SUSE Linux 10.0.
Comment 6 Sebastian Trueg 2006-01-31 22:44:12 UTC
then it is fixed in svn and i did not backport becasue it would introduce new 
strings....
Comment 7 Shriramana Sharma 2006-02-01 05:56:46 UTC
In which actual release can we expect it to be fixed, please?
Comment 8 Sebastian Trueg 2006-02-03 18:18:31 UTC
0.13
Comment 9 Shriramana Sharma 2006-04-11 01:54:27 UTC
Hmm... I thought it would be fixed in 0.12.13 but clearly I was wrong. I am now using 0.12.14 and still this bug exists. Would it be very difficult to apply this to the current 0.12 branch? Since it is the one currently getting released to everyone, I would think the more practical thing to do is to apply this bug's correction to that branch too!

Again I had to do the "Cancel burning" with a DVD today. :(
Comment 10 Shriramana Sharma 2006-04-11 02:07:51 UTC
And it looks like I have a coaster now because of this... I feel really bad you did not decide to implement this bugfix into the 0.12 branch. Please do not take this amiss, but how could you not feel that this bug was serious enough to fix it immediately? If I were maintainer of a package I would release the bugfix immediately. I hope you can understanding I am justifiably upset at wasting a DVD purchased with money... (Yes, yes, I read the "no guarantee" clause of the GPL.)
Comment 11 Sebastian Trueg 2006-04-11 13:56:16 UTC
All I said here is complete nonesense! Sorry.
Comment 12 Sebastian Trueg 2006-04-11 14:18:05 UTC
SVN commit 528555 by trueg:

Warn about shortened filenames before starting the burning.

BUG: 108429


 M  +1 -0      ChangeLog  
 M  +17 -0     libk3b/projects/datacd/k3bdatajob.cpp  
 M  +2 -0      libk3b/projects/datacd/k3bdatajob.h  
 M  +0 -11     libk3b/projects/datacd/k3bisoimager.cpp  
 M  +17 -0     libk3b/projects/datadvd/k3bdvdjob.cpp  
 M  +2 -0      libk3b/projects/datadvd/k3bdvdjob.h  
 M  +12 -1     libk3b/projects/mixedcd/k3bmixedjob.cpp  
 M  +1 -1      libk3b/projects/movixcd/k3bmovixjob.cpp  
 M  +1 -1      libk3b/projects/movixdvd/k3bmovixdvdjob.cpp  


--- branches/stable/extragear/multimedia/k3b/ChangeLog #528554:528555
@@ -8,6 +8,7 @@
  * Fixed the "invalid url" bug.
  * Use SG IO for scsi commands with newer linux kernels. This should fix problems with scsi device
    detection.
+ * Warn about shortened filenames due to Joliet restrictions before starting the burning process.
 
 0.12.14
 =======
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/datacd/k3bdatajob.cpp #528554:528555
@@ -134,6 +134,17 @@
 
   emit newTask( i18n("Preparing data") );
 
+  d->doc->prepareFilenames();
+  if( d->doc->needToCutFilenames() ) {
+    if( !questionYesNo( i18n("Some filenames need to be shortened due to the %1 char restriction "
+			     "of the Joliet extensions. Continue anyway?")
+			.arg( d->doc->isoOptions().jolietLong() ? 103 : 64 ) ) ) {
+      emit canceled();
+      emit finished( false );
+      return;
+    }
+  }
+  
   if( d->usedMultiSessionMode == K3bDataDoc::AUTO && !d->doc->onlyCreateImages() )
     determineMultiSessionMode();
   else
@@ -885,4 +896,10 @@
       .arg(KIO::convertSize( d->doc->size() ));
 }
 
+
+bool K3bDataJob::hasBeenCanceled() const
+{
+  return d->canceled;
+}
+
 #include "k3bdatajob.moc"
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/datacd/k3bdatajob.h #528554:528555
@@ -47,6 +47,8 @@
   K3bDoc* doc() const;
   K3bDevice::Device* writer() const;
 
+  virtual bool hasBeenCanceled() const;
+
   virtual QString jobDescription() const;
   virtual QString jobDetails() const;
 		
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/datacd/k3bisoimager.cpp #528554:528555
@@ -443,17 +443,6 @@
   kdDebug() << s << endl << flush;
   emit debuggingOutput("mkisofs command:", s);
 
-  if( m_doc->needToCutFilenames() ) {
-    if( !questionYesNo( i18n("Some filenames need to be shortened due to the %1 char restriction "
-			     "of the Joliet extensions. Continue anyway?")
-			.arg( m_doc->isoOptions().jolietLong() ? 103 : 64 ) ) ) {
-      emit canceled();
-      emit finished( false );
-      cleanup();
-      return;
-    }
-  }
-  
   if( !m_process->start( KProcess::NotifyOnExit, KProcess::AllOutput) ) {
     // something went wrong when starting the program
     // it "should" be the executable
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/datadvd/k3bdvdjob.cpp #528554:528555
@@ -98,6 +98,17 @@
   emit started();
   emit newTask( i18n("Preparing data") );
 
+  m_doc->prepareFilenames();
+  if( m_doc->needToCutFilenames() ) {
+    if( !questionYesNo( i18n("Some filenames need to be shortened due to the %1 char restriction "
+			     "of the Joliet extensions. Continue anyway?")
+			.arg( m_doc->isoOptions().jolietLong() ? 103 : 64 ) ) ) {
+      emit canceled();
+      emit finished( false );
+      return;
+    }
+  }
+
   m_canceled = false;
   m_writingStarted = false;
   d->copies = m_doc->copies();
@@ -774,4 +785,10 @@
       .arg(KIO::convertSize( m_doc->size() ));
 }
 
+
+bool K3bDvdJob::hasBeenCanceled() const
+{
+  return m_canceled;
+}
+
 #include "k3bdvdjob.moc"
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/datadvd/k3bdvdjob.h #528554:528555
@@ -48,6 +48,8 @@
   K3bDoc* doc() const;
   K3bDevice::Device* writer() const;
 
+  virtual bool hasBeenCanceled() const;
+
   virtual QString jobDescription() const;
   virtual QString jobDetails() const;
 
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/mixedcd/k3bmixedjob.cpp #528554:528555
@@ -142,8 +142,19 @@
   m_doc->audioDoc()->setHideFirstTrack( false );   // unsupported
   m_doc->dataDoc()->setBurner( m_doc->burner() );  // so the isoImager can read ms data
 
-  emit newTask( i18n("Preparing write process") );
+  emit newTask( i18n("Preparing data") );
 
+  m_doc->dataDoc()->prepareFilenames();
+  if( m_doc->dataDoc()->needToCutFilenames() ) {
+    if( !questionYesNo( i18n("Some filenames need to be shortened due to the %1 char restriction "
+			     "of the Joliet extensions. Continue anyway?")
+			.arg( m_doc->dataDoc()->isoOptions().jolietLong() ? 103 : 64 ) ) ) {
+      emit canceled();
+      emit finished( false );
+      return;
+    }
+  }
+
   determineWritingMode();
 
   // depending on the mixed type and if it's onthefly or not we
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/movixcd/k3bmovixjob.cpp #528554:528555
@@ -103,7 +103,7 @@
 {
   m_movixDocPreparer->removeMovixStructures();
 
-  if( m_canceled )
+  if( m_canceled || m_dataJob->hasBeenCanceled() )
     emit canceled();
 
   emit finished( success );
--- branches/stable/extragear/multimedia/k3b/libk3b/projects/movixdvd/k3bmovixdvdjob.cpp #528554:528555
@@ -102,7 +102,7 @@
 {
   m_movixDocPreparer->removeMovixStructures();
 
-  if( m_canceled )
+  if( m_canceled || m_dvdJob->hasBeenCanceled() )
     emit canceled();
 
   emit finished( success );