1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
|
/*
** Return non-NULL if zFilename contains pathname elements that
** are reserved on Windows. The returned string is the disallowed
** path element.
*/
const char *file_is_win_reserved(const char *zPath){
static const char *azRes[] = { "CON", "PRN", "AUX", "NUL", "COM", "LPT" };
static char zReturn[5];
int i;
while( zPath[0] ){
for(i=0; i<count(azRes); i++){
if( sqlite3_strnicmp(zPath, azRes[i], 3)==0
&& ((i>=4 && fossil_isdigit(zPath[3])
&& (zPath[4]=='/' || zPath[4]=='.' || zPath[4]==0))
|
|
|
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
|
/*
** Return non-NULL if zFilename contains pathname elements that
** are reserved on Windows. The returned string is the disallowed
** path element.
*/
const char *file_is_win_reserved(const char *zPath){
static const char *const azRes[] = { "CON", "PRN", "AUX", "NUL", "COM", "LPT" };
static char zReturn[5];
int i;
while( zPath[0] ){
for(i=0; i<count(azRes); i++){
if( sqlite3_strnicmp(zPath, azRes[i], 3)==0
&& ((i>=4 && fossil_isdigit(zPath[3])
&& (zPath[4]=='/' || zPath[4]=='.' || zPath[4]==0))
|
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
|
** As a special case, files currently undergoing an uncommitted merge
** might not get timestamped with --checkin because it may be
** impossible for fossil to choose between multiple potential
** timestamps. A non-fatal warning is emitted for such cases.
**
*/
void touch_cmd(){
const char * zGlobList; /* -g List of glob patterns */
const char * zGlobFile; /* -G File of glob patterns */
Glob * pGlob = 0; /* List of glob patterns */
int verboseFlag;
int dryRunFlag;
int vid; /* Checkout version */
int changeCount = 0; /* Number of files touched */
int quietFlag = 0; /* -q|--quiet */
|
|
|
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
|
** As a special case, files currently undergoing an uncommitted merge
** might not get timestamped with --checkin because it may be
** impossible for fossil to choose between multiple potential
** timestamps. A non-fatal warning is emitted for such cases.
**
*/
void touch_cmd(){
const char * zGlobList; /* -g List of glob patterns */
const char * zGlobFile; /* -G File of glob patterns */
Glob * pGlob = 0; /* List of glob patterns */
int verboseFlag;
int dryRunFlag;
int vid; /* Checkout version */
int changeCount = 0; /* Number of files touched */
int quietFlag = 0; /* -q|--quiet */
|
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
|
}
}else{
assert(newMtime>0);
}
changeCount +=
touch_cmd_stamp_one_file( zAbs, zArg, newMtime, dryRunFlag,
verboseFlag, quietFlag );
}
}
db_end_transaction(0);
blob_reset(&absBuffer);
if( dryRunFlag!=0 ){
fossil_print("dry-run: would have touched %d file(s)\n",
changeCount);
}else{
fossil_print("Touched %d file(s)\n", changeCount);
}
}
|
|
|
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
|
}
}else{
assert(newMtime>0);
}
changeCount +=
touch_cmd_stamp_one_file( zAbs, zArg, newMtime, dryRunFlag,
verboseFlag, quietFlag );
}
}
db_end_transaction(0);
blob_reset(&absBuffer);
if( dryRunFlag!=0 ){
fossil_print("dry-run: would have touched %d file(s)\n",
changeCount);
}else{
fossil_print("Touched %d file(s)\n", changeCount);
}
}
|