Exemplo n.º 1
0
    /// <summary>
    /// Sync's the file Descriptor, prompts for retry if there is
    /// an exception.
    /// </summary>
    /// <param name="fd"> OWFileDescriptor of Filesystem to sync </param>
    internal static void syncFileDescriptor(OWFileDescriptor fd)
    {
        for (;;)
        {
            try
            {
                fd.sync();
                return;
            }
            catch (OWSyncFailedException e)
            {
                Debug.WriteLine("");
                Debug.WriteLine("-----------------------------------------------");
                Debug.WriteLine(e);
                Debug.WriteLine("-----------------------------------------------");

                // prompt to try again
                if (menuSelect(retryMenu) == RETRY_NO)
                {
                    return;
                }
            }
        }
    }