Skip to content

Commit b9ed1aa

Browse files
committed
Merge branch 'release/2.13.0'
2 parents d53af11 + 266ba42 commit b9ed1aa

4 files changed

Lines changed: 27 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
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

js/config-base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ShakeMap = {
1919
};
2020

2121
const 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',

process_events.sh

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,26 @@ while getopts "d:e:l:x:k:m:n:h" opt; do
265265
esac
266266
done
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
269289
if [ -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
344357
fi
345358

346359
if [ -n "$NO_MOVE_IDS_FILE" ]; then

publiccode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: "INGV - ShakeMap4 Web Page"
77
releaseDate: 2026-05-14
88
url: "https://github.com/INGV/shakemap4-web"
99
landingURL: "https://github.com/INGV/shakemap4-web"
10-
softwareVersion: v2.12.0
10+
softwareVersion: v2.13.0
1111
developmentStatus: stable
1212
softwareType: standalone/other
1313
platforms:

0 commit comments

Comments
 (0)