[simias-svn] SF.net SVN: simias:[7459] trunk/src/utils/restore/iFolderServer.cs
Brought to you by:
srinidhi_bs
|
From: <sp...@us...> - 2010-08-11 11:26:12
|
Revision: 7459
http://simias.svn.sourceforge.net/simias/?rev=7459&view=rev
Author: spkumar
Date: 2010-08-11 11:26:05 +0000 (Wed, 11 Aug 2010)
Log Message:
-----------
ID: Bug#612830
Reviewer: Vikash
Localization Required: No
Documentation Required: No
Description: To fix an issue in restore tool when invalid path is
provided for ifolder backup store.
Modified Paths:
--------------
trunk/src/utils/restore/iFolderServer.cs
Modified: trunk/src/utils/restore/iFolderServer.cs
===================================================================
--- trunk/src/utils/restore/iFolderServer.cs 2010-08-11 10:48:10 UTC (rev 7458)
+++ trunk/src/utils/restore/iFolderServer.cs 2010-08-11 11:26:05 UTC (rev 7459)
@@ -154,6 +154,10 @@
/// Failed to restore iFolder policy
/// </summary>
PolicyRestoreFailed,
+ /// <summary>
+ /// Invalid Path Specified
+ /// </summary>
+ InvalidBackupPath,
}
public enum Command
@@ -2169,6 +2173,21 @@
Console.WriteLine("| The backup datapath does not exist |");
return (int)status.DataPathDoesNotExist;
}
+ else {
+ //Check for mandatory files in the given simias path
+ string simiasPath = DataPath+"/simias";
+ if( !Directory.Exists(simiasPath)) {
+ Console.WriteLine("| Error: simias directory does not exist at the specified path: {0} .|",DataPath);
+ return (int)status.InvalidBackupPath;
+ }
+ string flaimdb= DataPath+"/simias/FlaimSimias.db";
+ if(!File.Exists (flaimdb) ){
+
+ Console.WriteLine("| Error: iFolder simias database ({0}) does not exist at the specified path.|",flaimdb);
+ return (int)status.InvalidBackupPath;
+ }
+
+ }
if( Operation == (int)Command.Restore )
{
if(relativePath != string.Empty && relativePath != null) {
@@ -3055,8 +3074,11 @@
case (int)status.Failed:
Console.WriteLine("\n| Restore Operation failed. |");
break;
- case (int)status.InvalidInput:
- Console.WriteLine("\n| Restore Operation failed,Input data is Invalid. |");
+ case (int)status.InvalidInput:
+ Console.WriteLine("\n| Restore Operation failed,Input data is Invalid. |");
+ break;
+ case (int)status.InvalidBackupPath:
+ Console.WriteLine("| Invalid path specified for option --path | ");
break;
case (int)status.InvalidFormat:
Console.WriteLine("\n| Restore Operation failed , Input data Format is invalid. |");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|