Opened 4 years ago

Closed 4 years ago

#60401 closed defect (fixed)

2048.cpp: scores.txt and statistics.txt are registered to the port

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: chenguokai (Xim)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: 2048.cpp

Description

The files scores.txt and statistics.txt are registered to the port:

$ port contents 2048.cpp
Port 2048.cpp contains:
  /opt/local/bin/2048
  /opt/local/var/2048.cpp/data/scores.txt
  /opt/local/var/2048.cpp/data/statistics.txt

This means that if the port is upgraded, or deactivated and reactivated, or uninstalled and reinstalled, those files will be deleted and replaced with fresh copies. The names of those files make it sound like that would be undesirable, i.e. I don't think a user would expect their high scores to be wiped out by upgrading to a new version.

Change History (2)

comment:1 Changed 4 years ago by chenguokai (Xim)

Indeed a problem here, I will submit a patch adding a check for existing files, like the way used in apache2.

comment:2 Changed 4 years ago by Chen Guokai <chenguokai17@…>

Resolution: fixed
Status: assignedclosed

In 64a87a1a26651df670d275d162eea649277e05e2/macports-ports (master):

2048.cpp: fix user data overwritting and data store failure

  • fix user data overwritting during upgarde
  • fix data store failure on most paths

Closes #60401
Closes #60402

Note: See TracTickets for help on using tickets.