Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Remove some end-of-line whitespace and fix some very minor comment typos and capitalization errors |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
05379255237e325ffbc16b4133a8e070 |
| User & Date: | andygoth 2020-09-15 19:23:02.963 |
Context
|
2020-09-15
| ||
| 19:23 | Restore the ability to add symlinks located inside subdirectories check-in: 9d75d6ae88 user: andygoth tags: trunk | |
| 19:23 | Remove some end-of-line whitespace and fix some very minor comment typos and capitalization errors check-in: 0537925523 user: andygoth tags: trunk | |
| 16:40 | fossil.pikchr.addSrcView() now tags each processed SVG element to avoid potentially processing the same one multiple times. Added fossil.pikchr support to /doc, /wiki, and /wikiedit/fileedit previews. This is harmless if there are no pikchrs or JS is disabled. check-in: 83f03e91c4 user: stephan tags: trunk | |
Changes
Changes to src/add.c.
| ︙ | ︙ | |||
191 192 193 194 195 196 197 | } } /* ** Add all files in the sfile temp table. ** ** Automatically exclude the repository file and any other files | | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
}
}
/*
** Add all files in the sfile temp table.
**
** Automatically exclude the repository file and any other files
** with reserved names. Also exclude files that are beneath an
** existing symlink.
*/
static int add_files_in_sfile(int vid){
const char *zRepo; /* Name of the repository database file */
int nAdd = 0; /* Number of files added */
int i; /* Loop counter */
const char *zReserved; /* Name of a reserved file */
|
| ︙ | ︙ | |||
214 215 216 217 218 219 220 |
zRepo = blob_str(&repoName);
}
if( filenames_are_case_sensitive() ){
xCmp = fossil_strcmp;
}else{
xCmp = fossil_stricmp;
}
| | | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
zRepo = blob_str(&repoName);
}
if( filenames_are_case_sensitive() ){
xCmp = fossil_strcmp;
}else{
xCmp = fossil_stricmp;
}
db_prepare(&loop,
"SELECT pathname FROM sfile"
" WHERE pathname NOT IN ("
"SELECT sfile.pathname FROM vfile, sfile"
" WHERE vfile.islink"
" AND NOT vfile.deleted"
" AND sfile.pathname>(vfile.pathname||'/')"
" AND sfile.pathname<(vfile.pathname||'0'))"
|
| ︙ | ︙ |
Changes to src/file.c.
| ︙ | ︙ | |||
52 53 54 55 56 57 58 | ** ExtFILE Symbolic links always refer to the object to which the ** link points. Symlinks are never recognized as symlinks but ** instead always appear to the the target object. ** ** SymFILE Symbolic links always appear to be files whose name is ** the target pathname of the symbolic link. ** | | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ** ExtFILE Symbolic links always refer to the object to which the ** link points. Symlinks are never recognized as symlinks but ** instead always appear to the the target object. ** ** SymFILE Symbolic links always appear to be files whose name is ** the target pathname of the symbolic link. ** ** RepoFILE Like SymFILE if allow-symlinks is true, or like ** ExtFILE if allow-symlinks is false. In other words, ** symbolic links are only recognized as something different ** from files or directories if allow-symlinks is true. */ #define ExtFILE 0 /* Always follow symlinks */ #define RepoFILE 1 /* Follow symlinks if and only if allow-symlinks is OFF */ #define SymFILE 2 /* Never follow symlinks */ |
| ︙ | ︙ | |||
437 438 439 440 441 442 443 |
static const char *azReqTab[] = {
"blob", "delta", "rcvfrom", "user", "config"
};
if( !file_isfile(zFilename, ExtFILE) ) return 0;
sz = file_size(zFilename, ExtFILE);
if( sz<35328 ) return 0;
if( sz%512!=0 ) return 0;
| | | 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
static const char *azReqTab[] = {
"blob", "delta", "rcvfrom", "user", "config"
};
if( !file_isfile(zFilename, ExtFILE) ) return 0;
sz = file_size(zFilename, ExtFILE);
if( sz<35328 ) return 0;
if( sz%512!=0 ) return 0;
rc = sqlite3_open_v2(zFilename, &db,
SQLITE_OPEN_READWRITE, 0);
if( rc!=0 ) goto not_a_repo;
for(i=0; i<count(azReqTab); i++){
if( sqlite3_table_column_metadata(db, "main", azReqTab[i],0,0,0,0,0,0) ){
goto not_a_repo;
}
}
|
| ︙ | ︙ | |||
643 644 645 646 647 648 649 |
** zFilename is a symbolic link, it is the object that zFilename points
** to that is modified.
*/
int file_setexe(const char *zFilename, int onoff){
int rc = 0;
#if !defined(_WIN32)
struct stat buf;
| | | 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
** zFilename is a symbolic link, it is the object that zFilename points
** to that is modified.
*/
int file_setexe(const char *zFilename, int onoff){
int rc = 0;
#if !defined(_WIN32)
struct stat buf;
if( fossil_stat(zFilename, &buf, RepoFILE)!=0
|| S_ISLNK(buf.st_mode)
|| S_ISDIR(buf.st_mode)
){
return 0;
}
if( onoff ){
int targetMode = (buf.st_mode & 0444)>>2;
|
| ︙ | ︙ | |||
2552 2553 2554 2555 2556 2557 2558 |
if( 8==nFilename ) return 1;
return zEnd[-9]=='/' ? 2 : gotSuffix;
}
case 'T':
case 't':{
if( nFilename<9 || zEnd[-9]!='.'
|| fossil_strnicmp(".fslckout", &zEnd[-9], 9) ){
| | | 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 |
if( 8==nFilename ) return 1;
return zEnd[-9]=='/' ? 2 : gotSuffix;
}
case 'T':
case 't':{
if( nFilename<9 || zEnd[-9]!='.'
|| fossil_strnicmp(".fslckout", &zEnd[-9], 9) ){
return 0;
}
if( 9==nFilename ) return 1;
return zEnd[-10]=='/' ? 2 : gotSuffix;
}
default:{
return 0;
}
}
}
|