682
683
684
685
686
687
688
689
690
691
692
693
694
695
|
rc = rmdir(zName);
#endif
fossil_path_free(zMbcs);
return rc;
}
return 0;
}
/*
** Return true if the filename given is a valid filename for
** a file in a repository. Valid filenames follow all of the
** following rules:
**
** * Does not begin with "/"
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
|
rc = rmdir(zName);
#endif
fossil_path_free(zMbcs);
return rc;
}
return 0;
}
/* SQL Function: rmdir(NAME)
**
** Try to remove the directory NAME. Return zero on success and non-zero
** for failure.
*/
void file_rmdir_sql_function(
sqlite3_context *context,
int argc,
sqlite3_value **argv
){
const char *zName = (const char*)sqlite3_value_text(argv[0]);
int rc;
if( zName==0 ){
rc = 1;
}else{
rc = file_rmdir(zName);
}
sqlite3_result_int(context, rc);
}
/*
** Return true if the filename given is a valid filename for
** a file in a repository. Valid filenames follow all of the
** following rules:
**
** * Does not begin with "/"
|