Skip to content

Commit 58e542d

Browse files
committed
Fixed file:Empty file content when enable file lock.
1 parent 29234f0 commit 58e542d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

easierfile/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __del__(self):
5656
def __lock(self, is_lock):
5757
if self.status["exist"]:
5858
if is_lock:
59-
self.__m_file = open(self.__m_info["path"], "w")
59+
self.__m_file = open(self.__m_info["path"])
6060
_lock_file(self.__m_file)
6161
self.__m_is_lock = is_lock
6262
else:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "easierfile"
3-
version = "2.1.0"
3+
version = "2.2.0"
44
description = "An easier-to-use Python package that object-oriented encapsulates Python traditional built-in file operations."
55
license = "MIT"
66
authors = ["leoweyr <[email protected]>"]

0 commit comments

Comments
 (0)