Differences From Artifact [7e200015f8]:
- File src/add.c — part of check-in [c7278fd013] at 2007-09-22 06:47:11 on branch trunk — Win32 port now functional except network operations. This commit was done on windows :-). See win32.txt for status of all commands. No networking commands are functional yet. All path operations are now functioning. (user: jnc size: 3238) [more...]
To Artifact [ce8cf09189]:
- File src/add.c — part of check-in [da9d38e2c3] at 2007-10-15 20:45:11 on branch trunk — Fix the "add" command is that it does not allow users to accidently add files that contain shell wildcard characters. (user: drh size: 3358) [more...]
| ︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | + + + |
fossil_fatal("cannot open %s", zName);
}
file_tree_name(zName, &pathname);
zPath = blob_str(&pathname);
if( strcmp(zPath, "manifest")==0 || strcmp(zPath, "_FOSSIL_")==0 ){
fossil_fatal("cannot add %s", zPath);
}
if( !file_is_simple_pathname(zPath) ){
fossil_fatal("filename contains illegal characters: %s", zPath);
}
if( db_exists("SELECT 1 FROM vfile WHERE pathname=%Q", zPath) ){
db_multi_exec("UPDATE vfile SET deleted=0 WHERE pathname=%Q", zPath);
}else{
db_multi_exec(
"INSERT INTO vfile(vid,deleted,rid,mrid,pathname)"
"VALUES(%d,0,0,0,%Q)", vid, zPath);
}
|
| ︙ |