Fossil SCM

Notepad and Cygwin interpret absolute paths differently. Solution: make the path relative. This is generally better anyway because relative paths are shorter and less likely to overflow platform path limitations.

jan.nijtmans 2013-09-19 11:29 trunk
Commit 3cadf76c3d1b7645c73e7ad572f3f723b26c5799
1 file changed +5 -1
+5 -1
--- src/checkin.c
+++ src/checkin.c
@@ -642,12 +642,16 @@
642642
"# and because no comment was specified using the \"-m\" or \"-M\"\n"
643643
"# command-line options, you will need to enter the comment below.\n"
644644
"# Type \".\" on a line by itself when you are done:\n", -1);
645645
zFile = mprintf("-");
646646
}else{
647
+ Blob fname;
648
+ blob_zero(&fname);
649
+ file_relative_name(g.zLocalRoot, &fname, 1);
647650
zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
648
- g.zLocalRoot);
651
+ blob_str(&fname));
652
+ blob_reset(&fname);
649653
}
650654
#if defined(_WIN32)
651655
blob_add_cr(pPrompt);
652656
#endif
653657
blob_write_to_file(pPrompt, zFile);
654658
--- src/checkin.c
+++ src/checkin.c
@@ -642,12 +642,16 @@
642 "# and because no comment was specified using the \"-m\" or \"-M\"\n"
643 "# command-line options, you will need to enter the comment below.\n"
644 "# Type \".\" on a line by itself when you are done:\n", -1);
645 zFile = mprintf("-");
646 }else{
 
 
 
647 zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
648 g.zLocalRoot);
 
649 }
650 #if defined(_WIN32)
651 blob_add_cr(pPrompt);
652 #endif
653 blob_write_to_file(pPrompt, zFile);
654
--- src/checkin.c
+++ src/checkin.c
@@ -642,12 +642,16 @@
642 "# and because no comment was specified using the \"-m\" or \"-M\"\n"
643 "# command-line options, you will need to enter the comment below.\n"
644 "# Type \".\" on a line by itself when you are done:\n", -1);
645 zFile = mprintf("-");
646 }else{
647 Blob fname;
648 blob_zero(&fname);
649 file_relative_name(g.zLocalRoot, &fname, 1);
650 zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
651 blob_str(&fname));
652 blob_reset(&fname);
653 }
654 #if defined(_WIN32)
655 blob_add_cr(pPrompt);
656 #endif
657 blob_write_to_file(pPrompt, zFile);
658

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button