Menu

#330 Files still cannot be saved in some cases

v1.1.x
fixed
critical (96)
v1.1.1
Bug Fix
2018-05-25
2018-05-14
Erik Hänel
No

Larger files (in this case > 1000 lines) still cannot be saved in some cases. Find and solve the issue of this behavior.

Analysis:
The issus are not the long files but characters, which are not compatible with standard ANSI encoding. If these are in the file, then std::ofstream will not write the currently passed string to the file. Because it might be difficult to detect these characters, implement an after-saving check of the written file and a backup functionality, which will keep the previous version of the file in a separate file for automatic restoring.

Implementation:
The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.

Documentation:
The fix was documented in the Changes log. Further documentation not needed.

Tests:
There are still cases, where a file cannot be saved, however, the user is now notified correspondingly. Therefore, this ticket may be considered as fixed.

Discussion

  • Erik Hänel

    Erik Hänel - 2018-05-14
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-05-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     Larger files (in this case > 1000 lines) still cannot be saved in some cases. Find and solve the issue of this behavior.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-05-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
     Larger files (in this case > 1000 lines) still cannot be saved in some cases. Find and solve the issue of this behavior.
    
     **Analysis:**
    +The issus are not the long files but characters, which are not compatible with standard ANSI encoding. If these are in the file, then `std::ofstream` will not write the currently passed string to the file. Because it might be difficult to detect these characters, implement an after-saving check of the written file and a backup functionality, which will keep the previous version of the file in a separate file for automatic restoring.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-05-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,9 @@
     The issus are not the long files but characters, which are not compatible with standard ANSI encoding. If these are in the file, then `std::ofstream` will not write the currently passed string to the file. Because it might be difficult to detect these characters, implement an after-saving check of the written file and a backup functionality, which will keep the previous version of the file in a separate file for automatic restoring.
    
     **Implementation:**
    +The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.
    
     **Documentation:**
    +The fix was documented in the Changes log. Further documentation not needed.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2018-05-25
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,3 +10,4 @@
     The fix was documented in the Changes log. Further documentation not needed.
    
     **Tests:**
    +There are still cases, where a file cannot be saved, however, the user is now notified correspondingly. Therefore, this ticket may be considered as fixed.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel