Author: dieppe
Date: 2008-03-12 06:06:56 +0000 (Wed, 12 Mar 2008)
New Revision: 18483

Modified:
   trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java
Log:
In case the publish process fails, we revert the edition number.



Modified: 
trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java
===================================================================
--- trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java 
2008-03-12 06:04:40 UTC (rev 18482)
+++ trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java 
2008-03-12 06:06:56 UTC (rev 18483)
@@ -183,9 +183,11 @@
                 finished = success || "PutFailed".equals(messageName) || 
messageName.endsWith("Error");
             }            
         }
-        // If the publish has been made, we update the edition number to the 
current edition
+        // If the publish has been made, we update the edition number to the 
current edition, otherwise, we revert it
         if(finalURI != null){
             edition = 
Integer.parseInt(finalURI.substring(finalURI.length()-1));
+        } else {
+            edition--;
         }
         return success;
     }


Reply via email to