Fossil

Check-in [becc24e4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:On windows builds, understand both "C:/" and "C:\" as the beginning of an absolute pathname.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: becc24e4e9238cd6ccdace0c8047ae7c5fded6e3
User & Date: drh 2008-05-01 18:42:26.000
Context
2008-05-01
22:49
Enable proxy support using the "fossil setting proxy" command. This check-in is made using a proxy. ... (check-in: 676fdd08 user: drh tags: trunk)
18:42
On windows builds, understand both "C:/" and "C:\" as the beginning of an absolute pathname. ... (check-in: becc24e4 user: drh tags: trunk)
2008-04-25
22:31
initial checkin: quick hack to generate a .deb package of fossil. ... (check-in: adaa8411 user: stephan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
202
203
204
205
206
207
208

209



210
211
212
213
214
215
216
** Make the name absolute if it is relative.
** Remove redundant / characters
** Remove all /./ path elements.
** Convert /A/../ to just /
*/
void file_canonical_name(const char *zOrigName, Blob *pOut){
  if( zOrigName[0]=='/' 

      || (strlen(zOrigName)>3 && zOrigName[1]==':' && zOrigName[2]=='\\') ){



    blob_set(pOut, zOrigName);
    blob_materialize(pOut);
  }else{
    char zPwd[2000];
    if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
      fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20);
      exit(1);







>
|
>
>
>







202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
** Make the name absolute if it is relative.
** Remove redundant / characters
** Remove all /./ path elements.
** Convert /A/../ to just /
*/
void file_canonical_name(const char *zOrigName, Blob *pOut){
  if( zOrigName[0]=='/' 
#ifdef __MINGW32__
      || (strlen(zOrigName)>3 && zOrigName[1]==':'
           && (zOrigName[2]=='\\' || zOrigName[2]=='/'))
#endif
  ){
    blob_set(pOut, zOrigName);
    blob_materialize(pOut);
  }else{
    char zPwd[2000];
    if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
      fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20);
      exit(1);