manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CONNECTORS-1534) File System connector "deletes" files by making them zero bytes
Date Sat, 22 Sep 2018 05:08:00 GMT

    [ https://issues.apache.org/jira/browse/CONNECTORS-1534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624493#comment-16624493
] 

Karl Wright edited comment on CONNECTORS-1534 at 9/22/18 5:07 AM:
------------------------------------------------------------------

FWIW, this connector is not mine, and it looks like this behavior is intentional; the contributor
wanted a "grave marker" to be left behind to allow them to synchronize with other systems:

{code}
        // Null it out!
        try
        {
          output = new FileOutputStream(outputPath);
          break;
        }
        catch (FileNotFoundException e)
        {
          // Probably some other error
          errorCode = e.getClass().getSimpleName().toUpperCase(Locale.ROOT);
          errorDesc = "Couldn't delete the file due to:" + e.getMessage();
          throw new ManifoldCFException("Could not zero out file '"+outputPath+"': "+e.getMessage(),e);
        }
      }
      // Just close it, to make a zero-length grave marker.
      output.close();
{code}

For backwards compatibility reasons, you'd therefore want to add specification information
to the connector describing how you want deletions to be handled, which is basically a significant
enhancement to the connector, so I would ask if this is really something you need or just
something you don't like.


was (Author: kwright@metacarta.com):
FWIW, this connector is not mine, and it looks like this behavior is intentional; the contributor
wanted a "grave marker" to be left behind to allow them to synchronize with other systems:

{code}
        // Null it out!
        try
        {
          output = new FileOutputStream(outputPath);
          break;
        }
        catch (FileNotFoundException e)
        {
          // Probably some other error
          errorCode = e.getClass().getSimpleName().toUpperCase(Locale.ROOT);
          errorDesc = "Couldn't delete the file due to:" + e.getMessage();
          throw new ManifoldCFException("Could not zero out file '"+outputPath+"': "+e.getMessage(),e);
        }
      }
      // Just close it, to make a zero-length grave marker.
      output.close();
{code}


> File System connector "deletes" files by making them zero bytes
> ---------------------------------------------------------------
>
>                 Key: CONNECTORS-1534
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1534
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: File system connector
>    Affects Versions: ManifoldCF 2.10
>            Reporter: James Thomas
>            Assignee: Karl Wright
>            Priority: Major
>
> In https://issues.apache.org/jira/browse/CONNECTORS-1532 I observed that deleting a file
from a repository does not (reliably?) delete it from a File System output. Instead the output
file remains but is given zero size and a new modification time.
> I would expect that a file deletion in the repository results in file deletion in the
output.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message