Fossil

Check-in [f0805380f7]
Login

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

Overview
Comment:Do not allow "fossil open URL" without a --workdir option to work on a non-empty directory.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f0805380f7b4ddb7e040069a1a43cc4aa37e897e28e18134ec9c0a95b9af550b
User & Date: drh 2020-08-08 17:29:32.834
Context
2020-08-08
17:43
Disabled wikiedit save confirmation, by popular demand. (Discard/reload still requires confirmation due to the risk of data loss.) Added link to /wiki/PageName to the per-page links. check-in: 8635cb3d17 user: stephan tags: trunk
17:29
Do not allow "fossil open URL" without a --workdir option to work on a non-empty directory. check-in: f0805380f7 user: drh tags: trunk
17:18
Fix documentation typo. check-in: 08ab286028 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
3173
3174
3175
3176
3177
3178
3179



3180
3181
3182
3183
3184
3185
3186
      if( file_mkdir(zWorkDir, ExtFILE, 0) ){
        fossil_fatal("cannot create directory %s", zWorkDir);
      }
    }
    if( file_chdir(zWorkDir, 0) ){
      fossil_fatal("unable to make %s the working directory", zWorkDir);
    }



  }

  if( db_open_local_v2(0, allowNested) ){
    fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
  }

  /* If REPOSITORY looks like a URI, then try to clone it first */







>
>
>







3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
      if( file_mkdir(zWorkDir, ExtFILE, 0) ){
        fossil_fatal("cannot create directory %s", zWorkDir);
      }
    }
    if( file_chdir(zWorkDir, 0) ){
      fossil_fatal("unable to make %s the working directory", zWorkDir);
    }
  }else if( keepFlag==0 && isUri && file_directory_size(".", 0, 1)>0 ){
    fossil_fatal("directory %s is not empty\nuse \"--workdir .\" "
                 "to override this error", zPwd);
  }

  if( db_open_local_v2(0, allowNested) ){
    fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
  }

  /* If REPOSITORY looks like a URI, then try to clone it first */