Репозитории ALT
S: | 4.8.30-alt3 |
5.1: | 4.8.11-alt0.M51.1 |
4.1: | 4.6.2-alt7.pre1 |
4.0: | 4.6.1r-alt9 |
3.0: | 4.6.1r-alt3 |
Группа :: Работа с файлами
Пакет: mc
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: mc-4.6.1a-rh-uglydir.patch
Скачать
Скачать
--- mc-4.6.1-20041105/src/screen.c.uglydir 2004-11-05 17:21:19.159284328 +0100
+++ mc-4.6.1-20041105/src/screen.c 2004-11-05 17:37:27.076138600 +0100
@@ -864,8 +864,27 @@ show_dir (WPanel *panel)
tmp = g_malloc (panel->widget.cols + 1);
tmp[panel->widget.cols] = '\0';
+#ifndef UTF8
trim (strip_home_and_password (panel->cwd), tmp,
min (max (panel->widget.cols - 7, 0), panel->widget.cols) );
+
+ if (tmp && *tmp) {
+ char *s = tmp;
+ do {
+ if (!is_printable (*s))
+ *s = '?';
+ } while (*++s);
+ }
+#else
+ {
+ char *tmp2 = g_strdup(panel->cwd);
+ fix_utf8(tmp2);
+ trim (strip_home_and_password (tmp2), tmp,
+ min(max (panel->widget.cols - 7, 0), panel->widget.cols) );
+ g_free(tmp2);
+ }
+#endif
+
addstr (tmp);
g_free (tmp);
widget_move (&panel->widget, 0, 1);
--- mc-4.6.1-20041105/src/subshell.c.uglydir 2004-11-03 20:43:17.000000000 +0100
+++ mc-4.6.1-20041105/src/subshell.c 2004-11-05 17:21:19.245271256 +0100
@@ -954,6 +954,22 @@ feed_subshell (int how, int fail_on_erro
subshell_cwd[bytes - 1] = 0; /* Squash the final '\n' */
+ if (*subshell_cwd && current_panel && current_panel->cwd && strcmp(current_panel->cwd, subshell_cwd) &&
+ strchr(current_panel->cwd, '\n'))
+ {
+ /* Expected CWD is diffrent and it contains line break.
+ * We need to read rest of CWD, because previous read()
+ * returns first line only.
+ */
+ int rbytes;
+
+ subshell_cwd[bytes-1] = '\n';
+ rbytes = read(subshell_pipe[READ], (subshell_cwd+bytes),
+ MC_MAXPATHLEN-bytes);
+ if (rbytes)
+ subshell_cwd[bytes+rbytes-1] = 0; /* Squash the final '\n' */
+ }
+
synchronize ();
subshell_ready = TRUE;