Skip to content
Snippets Groups Projects
Commit a9ff8ecf authored by Koehorst, Jasper's avatar Koehorst, Jasper
Browse files

Update unlock-rules.re

parent b407bfbc
No related branches found
No related tags found
No related merge requests found
#This file is available for WUR techs to write their own rules
################################################################################
# Rule to delete hidden files
################################################################################
deleteHiddenFiles{
if (*path == "") {*abspath = "/$rodsZoneClient/home/$userNameClient"}
else {*abspath = "/$rodsZoneClient/home/$userNameClient/*path"}
msiGetObjType(*abspath, *type);
if(*type == "-d") { writeLine("stdout", "ERROR: collection path expected");}
else{
writeLine("stdout", "Removing hidden files in *abspath");
foreach(*row in SELECT COLL_NAME, DATA_NAME where COLL_NAME like "*abspath%" and DATA_NAME like "._%"){
*coll = *row.COLL_NAME;
*obj = *row.DATA_NAME;
*objpath = *coll++"/"++*obj;
writeLine("stdout", "DELETE: *objpath");
msiDataObjUnlink("*objpath", *status);
#writeLine("stdout", "DELETE: *status");
}
#remove orphaned metadata
msiDeleteUnusedAVUs()
}
}
INPUT *path=""
OUTPUT ruleExecOut
################################################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment