File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Release Notes
22
3+ ### Release 2.13.0 (2026-05-14)
4+ - Validate move directory writability with real create/remove checks
5+
36### Release 2.12.0 (2026-05-14)
47 - Validate ` --no-move ` files by opening them instead of relying on permission metadata
58
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const ShakeMap = {
1919} ;
2020
2121const config = {
22- version : "v2.12 .0" ,
22+ version : "v2.13 .0" ,
2323 githubLink : "https://github.com/INGV/shakemap4-web" ,
2424 disclaimerPage : './disclaimer-ingv.md' ,
2525 contributorsPage : './contributors-ingv.md' ,
Original file line number Diff line number Diff line change @@ -265,6 +265,26 @@ while getopts "d:e:l:x:k:m:n:h" opt; do
265265 esac
266266done
267267
268+ # Function to verify directory writability by doing a real create/remove test.
269+ # Some mounted filesystems can make test -w return false even when writes work.
270+ ensure_directory_writable () {
271+ local dir=$1
272+ local label=$2
273+ local tmp_dir=" ${dir%/ } /.process_events_write_test.$$ .$RANDOM "
274+
275+ if ! mkdir " $tmp_dir " 2> /dev/null; then
276+ echo " Error: $label must allow directory creation when -m/--move-days is used: $dir " >&2
277+ return 1
278+ fi
279+
280+ if ! rmdir " $tmp_dir " 2> /dev/null; then
281+ echo " Error: $label must allow directory removal when -m/--move-days is used: $dir " >&2
282+ return 1
283+ fi
284+
285+ return 0
286+ }
287+
268288# Validate required argument
269289if [ -z " $DATA_DIR " ]; then
270290 echo " Error: -d option is required to specify DATA_DIR" >&2
@@ -332,15 +352,8 @@ if [ -n "$MOVE_DAYS" ]; then
332352 exit 1
333353 fi
334354
335- if [ ! -w " $DATA_DIR " ]; then
336- echo " Error: DATA_DIR must be writable when -m/--move-days is used: $DATA_DIR " >&2
337- exit 1
338- fi
339-
340- if [ ! -w " $DATA_STORAGE_DIR " ]; then
341- echo " Error: DATA_STORAGE_DIR must be writable when -m/--move-days is used: $DATA_STORAGE_DIR " >&2
342- exit 1
343- fi
355+ ensure_directory_writable " $DATA_DIR " " DATA_DIR" || exit 1
356+ ensure_directory_writable " $DATA_STORAGE_DIR " " DATA_STORAGE_DIR" || exit 1
344357fi
345358
346359if [ -n " $NO_MOVE_IDS_FILE " ]; then
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ name: "INGV - ShakeMap4 Web Page"
77releaseDate : 2026-05-14
88url : " https://github.com/INGV/shakemap4-web"
99landingURL : " https://github.com/INGV/shakemap4-web"
10- softwareVersion : v2.12 .0
10+ softwareVersion : v2.13 .0
1111developmentStatus : stable
1212softwareType : standalone/other
1313platforms :
You can’t perform that action at this time.
0 commit comments