Home Forums .NET libraries Xceed SFTP/FTP for .NET XCEED FTP Error with identical source file names (linux)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21000 |

    Hello,

    to make it clear at the beginning, i am nt an linux “guru”, so i guess it’s a simple problem, but maybe somebdy can helpm with it…

    I am using ftp easysynchronize to synchronize folders and files betwen a linux server (master) and windows xp systems (slave).

    Things worked fine for some month, but yesterday we had the problem, that ftp interrupted immediatelly.

    Debug showed us, that xceed ftp had problems becaus “a key allready exists in the hashtable (i guess metadata).

    The inner exception showed the filename and we checked on the linux machine. And really, the same file exists there TWO TIMES with identical naming (Also Case sensitive). For my opinion, that must be impossible……

    My Questions:

    1. Is here a way to tell xceed synchronizer.easysynchronize to continue in such case or generally when it runs into an exception?

    2. How could it be, tht a file exists two times on the machine..

     Any help appreciated..

    Have a nice weekend

    Best regards from Germany

    Ralph

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Ralph (had 1772 views)

    User (Old forums)
    Member
    Post count: 23064

    Are the files in the same directory? If so, we never anticipated that two files with the exact same name could exist in the same directory.  So unfortunately, the exception isn’t skip-able because the component doesn’t know what to do in this scenario.

     

    Could you give us a more details on the file hierarchy you have on your Linux machine like what are the duplicate names, what folders are they in, are they some special type of file like a link or something, etc.  We are rather puzzled by this.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 363 views)

    User (Old forums)
    Member
    Post count: 23064

    Hello André,

    thanks for your reply.

    As it looks right now, we have a problem with our ftp server. After we deleted the files, they still exist, but only in all ftp-clients we use. When we use telnet they are not in the fileSytem. We use ProftpD as the server and try to check the problems.

    My Question is: Is there any way to continue after that file (so skip it) with easySync after it runs into the catch block?

    Tnaks for your reply in advance

    Best regards

     

    Ralph

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Ralph (had 469 views)

    User (Old forums)
    Member
    Post count: 23064

    You can handle the ItemException event, which is available on the FileSystemEvents class, which you need to pass as a parameter to the EasySynchronize() method.

    e.g.:

    private static void someFunction()

    {

        FileSystemEvents events = new FileSystemEvents();

        events.ItemException +=

    new ItemExceptionEventHandler( events_ItemException );

        Synchronizer.EasySynchronize( events, itemsToSynchronize );

     

    }

    static void events_ItemException( object sender, ItemExceptionEventArgs e )

    {

        //You can check for the exception that is raised in this case before deciding to ignore it

        //if( e.Exception == yourException )

            e.Action =

    ItemExceptionAction.Ignore;

        //else

            //e.Action = ItemExceptionAction.Abort;

    }

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 1584 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.