Tcl Source Code

Check-in [ef8bec8154]
Login

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

Overview
Comment:3597000 Consistent [file copy] result.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-4-branch
Files: files | file ages | folders
SHA1: ef8bec815489c0153e20259fc1ec126cfca416a2
User & Date: dgp 2013-03-19 14:26:10
Context
2013-03-19
14:55
Handle the (unlikely) case that the file is deleted in between. Suggested by Harald Oehlmann (Thanks... check-in: ee85786241 user: jan.nijtmans tags: core-8-4-branch
14:31
3597000 Consistent [file copy] result. check-in: 629ee9f78d user: dgp tags: core-8-5-branch
14:26
3597000 Consistent [file copy] result. check-in: ef8bec8154 user: dgp tags: core-8-4-branch
13:37
make sure that [file stat] returns the right data, even for locked files. check-in: f92d60cd3d user: jan.nijtmans tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.





1
2
3
4
5
6
7




2013-03-19  Jan Nijtmans  <[email protected]>

	* win/tclWinFile.c: [Bug 2893771]: file stat fails on locked files
	on win32.

2013-03-18  Donal K. Fellows  <[email protected]>

>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
2013-03-19  Don Porter  <[email protected]>

	* generic/tclFCmd.c: [Bug 3597000] Consistent [file copy] result.

2013-03-19  Jan Nijtmans  <[email protected]>

	* win/tclWinFile.c: [Bug 2893771]: file stat fails on locked files
	on win32.

2013-03-18  Donal K. Fellows  <[email protected]>

Changes to generic/tclFCmd.c.

687
688
689
690
691
692
693

694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
	if (result != TCL_OK) {
	    /* 
	     * We could examine 'errno' to double-check if the problem
	     * was with the target, but we checked the source above,
	     * so it should be quite clear 
	     */
	    errfile = target;

	    /* 
	     * We now need to reset the result, because the above call,
	     * if it failed, may have put an error message in place.
	     * (Ideally we would prefer not to pass an interpreter in
	     * above, but the channel IO code used by
	     * TclCrossFilesystemCopy currently requires one)
	     */
	    Tcl_ResetResult(interp);
	}
    }
    if ((copyFlag == 0) && (result == TCL_OK)) {
	if (S_ISDIR(sourceStatBuf.st_mode)) {
	    result = Tcl_FSRemoveDirectory(source, 1, &errorBuffer);
	    if (result != TCL_OK) {
		if (Tcl_FSEqualPaths(errfile, source) == 0) {
		    errfile = source;







>
|
|
<
|
|
|
|
|
<







687
688
689
690
691
692
693
694
695
696

697
698
699
700
701

702
703
704
705
706
707
708
	if (result != TCL_OK) {
	    /* 
	     * We could examine 'errno' to double-check if the problem
	     * was with the target, but we checked the source above,
	     * so it should be quite clear 
	     */
	    errfile = target;
	}
	/* 
	 * We now need to reset the result, because the above call,

	 * may have left set it.  (Ideally we would prefer not to pass
	 * an interpreter in above, but the channel IO code used by
	 * TclCrossFilesystemCopy currently requires one)
	 */
	Tcl_ResetResult(interp);

    }
    if ((copyFlag == 0) && (result == TCL_OK)) {
	if (S_ISDIR(sourceStatBuf.st_mode)) {
	    result = Tcl_FSRemoveDirectory(source, 1, &errorBuffer);
	    if (result != TCL_OK) {
		if (Tcl_FSEqualPaths(errfile, source) == 0) {
		    errfile = source;