Skip to content

Commit 4b54977

Browse files
authored
filemanager.py
Signed-off-by: LcferShell <[email protected]>
1 parent 7d47192 commit 4b54977

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libs/filemanager.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,7 @@ def validate_file(file_path, max_size_mb=100, max_read_time=2):
766766
start_time = time.time()
767767

768768
# Baca file
769-
with open(file_path, "rb+",
770-
encoding=sys.getfilesystemencoding()) as f:
769+
with open(file_path, "rb") as f:
771770
# Baca bagian pertama file untuk memeriksa apakah file biner
772771
first_bytes = f.read(1024)
773772
if b"\x00" in first_bytes:

0 commit comments

Comments
 (0)