Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deletes Destination File and Copy again to Destination #20

Open
Shyam200408 opened this issue Dec 6, 2016 · 0 comments
Open

Deletes Destination File and Copy again to Destination #20

Shyam200408 opened this issue Dec 6, 2016 · 0 comments

Comments

@Shyam200408
Copy link

Hi Team,
I would like to say thanks, that this solution is really good and works perfectly till now.
However , I found one issue in code under DocXTemplateEngine.cs > Process > Process(string source, string destination, object data):

This function checks if destination file exists, if exists then delete it and then copy source file to destination...

so my question is why do we have to do that since, we need to update same file , no one will have another copy of same file and that is not practically good approach.

I just commented lines below, and I am able to update same file which is a source file:

//if (File.Exists(destination))
File.Delete(destination);
//File.Copy(source, destination);

@Shyam200408 Shyam200408 changed the title Deletes Source File and Creates Destination File Deletes Destination File and Copy again to Destination Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant