My favorites | Sign in
Project Home Downloads Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 3: When saving an exported Common.NetworkPackage object to disk, the content of the file is overwritten, not deleted.
1 person starred this issue and may be notified of changes. Back to list
 
Project Member Reported by lucasnod...@gmail.com, Jan 29, 2011
What steps will reproduce the problem?
1. Generate a meta asset
2. Reduce the total length of the xml data for the meta asset
3. Old information will trail the termination of the current meta asset xml marker.

What is the expected output? What do you see instead?
I expect to see the </MetaAsset> at the end, instead I see the data that had previously existed at its same location.


Jan 29, 2011
Project Member #1 lucasnod...@gmail.com
Work has been started.
Status: Started
Jan 29, 2011
Project Member #2 lucasnod...@gmail.com
Issue is at Common.FileSystem.ResourceBase.GetExclusiveWriteStream(string openedLocation) - Currently the GetStreamInternal uses FileMode.OpenOrCreate.  This creates a problem as if the file exists, it will be opened and the new data will overwrite the existing data.  As long as the new data is longer than the old data, there is no issue.  However, when the new data is of less length, artifacts remain from the old data.  Sofar, this has only presented in the windows client because the server is constantly creating new version files and not opening the existing files.

The resolution will be in changing the FileMode.OpenOrCreate to FileMode.Create to force the filesystem to delete the old file and create a new file.
Jan 29, 2011
Project Member #3 lucasnod...@gmail.com
Change is implemented and testing verifies that it resolved this issue.  This fix will be committed in the next code commit (r4).
Status: Done

Powered by Google Project Hosting