Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • caosdb/src/caosdb-server
1 result
Show changes
Commits on Source (3)
...@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
* #125 - `bend_symlinks` script did not allow whitespace in filename.
* #122 - Dead-lock due to error in the DatabaseAccessManager. * #122 - Dead-lock due to error in the DatabaseAccessManager.
* #120 - Editing entities that were created with a no longer existing user * #120 - Editing entities that were created with a no longer existing user
leads to a server error. leads to a server error.
......
...@@ -66,8 +66,10 @@ if [ $IS_MOVE -eq 1 ] ; then ...@@ -66,8 +66,10 @@ if [ $IS_MOVE -eq 1 ] ; then
REPLACEMENT=$(new_dir "$REPLACEMENT") REPLACEMENT=$(new_dir "$REPLACEMENT")
fi fi
set -o noglob set -o noglob
for syml in $(find -P $(realpath $FILE_SYSTEM_ROOT) -type l) ; do find -P $(realpath $FILE_SYSTEM_ROOT) -type l -print0 |
while ISF= read -r -d '' syml; do
OLD_TARGET=$(realpath -m "$syml" | sed -n -r "/$REGEX_OLD/p") OLD_TARGET=$(realpath -m "$syml" | sed -n -r "/$REGEX_OLD/p")
if [ -z "$OLD_TARGET" ] ; then if [ -z "$OLD_TARGET" ] ; then
# filter non matching # filter non matching
......
...@@ -37,6 +37,8 @@ function escape_simple_path () { ...@@ -37,6 +37,8 @@ function escape_simple_path () {
SPATH=$(echo "$SPATH" | sed -r "s/\(/\\\\(/g") SPATH=$(echo "$SPATH" | sed -r "s/\(/\\\\(/g")
# { # {
SPATH=$(echo "$SPATH" | sed -r "s/\{/\\\\{/g") SPATH=$(echo "$SPATH" | sed -r "s/\{/\\\\{/g")
# white space
SPATH=$(echo "$SPATH" | sed -r "s/ /\\ /g")
echo "$SPATH" echo "$SPATH"
} }
......
...@@ -23,8 +23,11 @@ tearDown () { ...@@ -23,8 +23,11 @@ tearDown () {
_make_test_file () { _make_test_file () {
touch "$DATA_DIR/$1" touch "$DATA_DIR/$1"
ln -s $(realpath "$DATA_DIR/$1") "$FILE_SYSTEM_ROOT/$1" TARGET=$(realpath "$DATA_DIR/$1")
assertEquals "initial target $1" $(realpath "$FILE_SYSTEM_ROOT/$1") $(realpath "$DATA_DIR/$1") LINK=$FILE_SYSTEM_ROOT/$1
ln -s "$TARGET" "$LINK"
LINKED=$(realpath "$LINK")
assertEquals "initial target $1" "$LINKED" "$TARGET"
} }
_break_link_move_file () { _break_link_move_file () {
...@@ -35,7 +38,8 @@ _break_link_move_file () { ...@@ -35,7 +38,8 @@ _break_link_move_file () {
NEW_PATH_REAL=$(realpath "$NEW_PATH") NEW_PATH_REAL=$(realpath "$NEW_PATH")
LINK="$FILE_SYSTEM_ROOT/$1" LINK="$FILE_SYSTEM_ROOT/$1"
mv "$OLD_PATH_REAL" "$NEW_PATH_REAL" mv "$OLD_PATH_REAL" "$NEW_PATH_REAL"
assertEquals "still target $OLD_PATH_REAL" $(realpath "$LINK") "$OLD_PATH_REAL" LINKED=$(realpath "$LINK")
assertEquals "still target $OLD_PATH_REAL" "$LINKED" "$OLD_PATH_REAL"
assertFalse "$LINK link is broken" "[ -f '$LINK' ]" assertFalse "$LINK link is broken" "[ -f '$LINK' ]"
assertFalse "$OLD_PATH_REAL was moved" "[ -f '$OLD_PATH_REAL' ]" assertFalse "$OLD_PATH_REAL was moved" "[ -f '$OLD_PATH_REAL' ]"
assertTrue "$NEW_PATH_REAL is there" "[ -f '$NEW_PATH_REAL' ]" assertTrue "$NEW_PATH_REAL is there" "[ -f '$NEW_PATH_REAL' ]"
...@@ -51,7 +55,7 @@ assertLinkOk () { ...@@ -51,7 +55,7 @@ assertLinkOk () {
LINK=$(realpath "$FILE_SYSTEM_ROOT/$1") LINK=$(realpath "$FILE_SYSTEM_ROOT/$1")
TARGET=$(realpath "$DATA_DIR/$2") TARGET=$(realpath "$DATA_DIR/$2")
assertTrue "target exists $LINK" "[ -f '$LINK' ]" assertTrue "target exists $LINK" "[ -f '$LINK' ]"
assertEquals "target matches $TARGET" $TARGET "$LINK" assertEquals "target matches $TARGET" "$TARGET" "$LINK"
set +o noglob set +o noglob
} }
...@@ -135,6 +139,7 @@ testFullPathWithStrangeChars () { ...@@ -135,6 +139,7 @@ testFullPathWithStrangeChars () {
_testFullPathWithStrageChars "{" _testFullPathWithStrageChars "{"
_testFullPathWithStrageChars "]" _testFullPathWithStrageChars "]"
_testFullPathWithStrageChars "[.]" _testFullPathWithStrageChars "[.]"
_testFullPathWithStrageChars " "
} }
testRegex () { testRegex () {
......
...@@ -27,5 +27,3 @@ Indices and tables ...@@ -27,5 +27,3 @@ Indices and tables
================== ==================
* :ref:`genindex` * :ref:`genindex`
* :ref:`modindex`
* :ref:`search`