Skip to content

Commit

Permalink
Merge pull request #127 from TheElementalOfCreation/master
Browse files Browse the repository at this point in the history
v0.24.3
  • Loading branch information
TheElementalOfDestruction authored Jun 18, 2020
2 parents d18d34a + 851327e commit c4b8860
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**v0.24.3**
* Added new close function to the `Message` class to ensure that all embedded `Message` instances get closed as well. Not having this was causing issues with trying to modify the msg file after the user thought that it had been closed.

**v0.24.2**
* Fixed bug that somehow escaped detection that caused certain properties to not work.
* Fixed bug with embedded msg files introduced in v0.24.0
Expand Down
4 changes: 2 additions & 2 deletions extract_msg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

__author__ = 'Matthew Walker & The Elemental of Creation'
__date__ = '2020-05-29'
__version__ = '0.24.2'
__date__ = '2020-06-18'
__version__ = '0.24.3'

from extract_msg import constants
from extract_msg.attachment import Attachment
Expand Down
6 changes: 6 additions & 0 deletions extract_msg/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ def _getStringStream(self, filename, prefix = True):
else:
tmp = self._getStream(filename + '001E', prefix = False)
return None if tmp is None else tmp.decode(self.stringEncoding)

def close(self):
for attachment in self.attachments:
if attachment.type == 'msg':
attachment.data.close()
olefile.OleFileIO.close(self)

def debug(self):
for dir_ in self.listDir():
Expand Down

0 comments on commit c4b8860

Please sign in to comment.