Skip to content

Commit

Permalink
filemanager.py
Browse files Browse the repository at this point in the history
Signed-off-by: LcferShell <71859305+LcfherShell@users.noreply.github.com>
  • Loading branch information
LcfherShell authored Aug 31, 2024
1 parent 7d47192 commit 4b54977
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/filemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,7 @@ def validate_file(file_path, max_size_mb=100, max_read_time=2):
start_time = time.time()

# Baca file
with open(file_path, "rb+",
encoding=sys.getfilesystemencoding()) as f:
with open(file_path, "rb") as f:
# Baca bagian pertama file untuk memeriksa apakah file biner
first_bytes = f.read(1024)
if b"\x00" in first_bytes:
Expand Down

0 comments on commit 4b54977

Please sign in to comment.