diff -d -urpN mc.1/src/file.c mc.2/src/file.c
old
|
new
|
panel_operate (void *source_panel, FileO |
1806 | 1806 | else |
1807 | 1807 | dest_dir = panel->cwd; |
1808 | 1808 | /* |
1809 | | * Add trailing backslash only when do non-locally ops. |
| 1809 | * Add trailing backslash only when do non-local ops. |
1810 | 1810 | * It saves user from occasional file renames (when destination |
1811 | 1811 | * dir is deleted) |
1812 | 1812 | */ |
1813 | | if (force_single) |
1814 | | /* just copy */ |
1815 | | dest_dir_ = g_strdup (dest_dir); |
1816 | | else |
| 1813 | if (!force_single |
| 1814 | && dest_dir[0] |
| 1815 | && dest_dir[strlen(dest_dir)-1] != PATH_SEP) { |
1817 | 1816 | /* add trailing separator */ |
1818 | | if (*dest_dir && strcmp(&dest_dir[strlen(dest_dir)-1], PATH_SEP_STR)) { |
1819 | | dest_dir_ = g_strconcat (dest_dir, PATH_SEP_STR, (char*)0); |
| 1817 | dest_dir_ = g_strconcat (dest_dir, PATH_SEP_STR, (char*)0); |
1820 | 1818 | } else { |
1821 | | dest_dir_ = g_strdup (dest_dir); |
| 1819 | /* just copy */ |
| 1820 | dest_dir_ = g_strdup (dest_dir); |
1822 | 1821 | } |
1823 | 1822 | if (!dest_dir_) { |
1824 | 1823 | file_op_context_destroy (ctx); |
… |
… |
panel_operate (void *source_panel, FileO |
1830 | 1829 | single_entry, &do_bg); |
1831 | 1830 | g_free(dest_dir_); |
1832 | 1831 | |
1833 | | if (!dest) { |
1834 | | file_op_context_destroy (ctx); |
1835 | | return 0; |
1836 | | } |
1837 | | if (!*dest) { |
| 1832 | if (!dest || !dest[0]) { |
1838 | 1833 | file_op_context_destroy (ctx); |
1839 | 1834 | g_free (dest); |
1840 | 1835 | return 0; |