Skip to content

Commit

Permalink
nc-restore: check that we are in linux fs
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Nov 27, 2018
1 parent 5278bfd commit 88d9fe2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

[v0.67.2](https://github.com/nextcloud/nextcloudpi/commit/868b576) (2018-11-26) change dialog text width to 120
[v0.67.3](https://github.com/nextcloud/nextcloudpi/commit/d3c72cc) (2018-11-26) nc-datadir: shorten short description

[v0.67.1](https://github.com/nextcloud/nextcloudpi/commit/b0262f9) (2018-11-23) referrer policy already in .htaccess in NC14.0.4
[v0.67.2 ](https://github.com/nextcloud/nextcloudpi/commit/5e4be44) (2018-11-26) change dialog text width to 120

[v0.67.1 ](https://github.com/nextcloud/nextcloudpi/commit/b0262f9) (2018-11-23) referrer policy already in .htaccess in NC14.0.4

[v0.67.0 ](https://github.com/nextcloud/nextcloudpi/commit/bcac4bc) (2018-11-22) upgrade to NC14.0.4

Expand Down
2 changes: 2 additions & 0 deletions etc/ncp-config.d/nc-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ DIR="$( cd "$( dirname "$BACKUPFILE" )" &>/dev/null && pwd )" #abspath
[[ "$DIR" =~ "$NCDIR" ]] && { echo "Refusing to restore from $NCDIR"; exit 1; }
TMPDIR="$( mktemp -d "$( dirname "$BACKUPFILE" )"/ncp-restore.XXXXXX )" || { echo "Failed to create temp dir" >&2; exit 1; }
grep -q -e ext -e btrfs <( stat -fc%T "$TMPDIR" ) || { echo "Can only restore from ext/btrfs filesystems" >&2; exit 1; }
TMPDIR="$( cd "$TMPDIR" &>/dev/null && pwd )" || { echo "$TMPDIR not found"; exit 1; } #abspath
cleanup(){ local RET=$?; echo "Cleanup..."; rm -rf "${TMPDIR}"; trap "" EXIT; exit $RET; }
trap cleanup INT TERM HUP ERR EXIT
Expand Down

0 comments on commit 88d9fe2

Please sign in to comment.