Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
CalendarObject: Update code
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 11 Jan 2017 19:58:05 +0000 (19:58 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 11 Jan 2017 19:58:05 +0000 (19:58 +0000)
source/objects/calendarobject/CalendarObject-Save.cpp

index 895cacb..4142495 100644 (file)
@@ -20,8 +20,6 @@ CalendarObjectSaveResult CalendarObject::SaveFile(string SaveFilename){
                return CALENDAROBJECTSAVE_CANNOTOPEN;
        }
        
-       FileStream.close();
-       
        // Process the data into a string.
        
        CalendarObjectSaveResult SaveResult = CALENDAROBJECTSAVE_UNITTESTFAIL;
@@ -29,6 +27,10 @@ CalendarObjectSaveResult CalendarObject::SaveFile(string SaveFilename){
        
        SaveResult = SaveString(&SaveStringData);
        
+       FileStream.write(SaveStringData.c_str(), SaveStringData.size());
+       
+       FileStream.close();
+       
        return SaveResult;
        
 }
@@ -90,12 +92,14 @@ CalendarObjectSaveResult CalendarObject::SaveString(string *SaveStringData){
 
        *SaveStringData += "PRODID:-//Xestia//Calendar Version ";
        *SaveStringData += XSDCAL_VERSION;
-       *SaveStringData += "\n";
+       *SaveStringData += "//KW\n";
        
 #endif
        
        SaveObjectData(SaveStringData);
        
        *SaveStringData += "END:VCALENDAR";
+       
+       return CALENDAROBJECTSAVE_OK;
 
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy