diff --git a/src/browser.c b/src/browser.c index 280de40495cace6ae519e2b68bf21702558329aa..9824a896a8945e6efc23cb6a744c296e6f668bbd 100644 --- a/src/browser.c +++ b/src/browser.c @@ -378,8 +378,7 @@ char *do_browse_from(const char *inpath) beep(); napms(1200); return NULL; - } else - snuggly_fit(&path); + } } } diff --git a/src/files.c b/src/files.c index 147a26cbd6aed4811020024628570e832b7857d1..80fbefeb3459c7bb0d8895295cfc6bb045e0efd8 100644 --- a/src/files.c +++ b/src/files.c @@ -1348,8 +1348,7 @@ char *get_full_path(const char *origpath) if (strcmp(d_here, "/") != 0) { d_here = charealloc(d_here, strlen(d_here) + 2); strcat(d_here, "/"); - } else - snuggly_fit(&d_here); + } /* Otherwise, set d_here to "". */ } else { d_here = mallocstrcpy(NULL, ""); @@ -1410,8 +1409,7 @@ char *get_full_path(const char *origpath) if (strcmp(d_there, "/") != 0) { d_there = charealloc(d_there, strlen(d_there) + 2); strcat(d_there, "/"); - } else - snuggly_fit(&d_there); + } /* Otherwise, make sure that we return NULL. */ } else { path_only = TRUE; @@ -1528,6 +1526,8 @@ void init_operating_dir(void) /* If the operating directory is inaccessible, fail. */ if (full_operating_dir == NULL || chdir(full_operating_dir) == -1) die("Invalid operating directory\n"); + + snuggly_fit(full_operating_dir); } /* Check to see if we're inside the operating directory. Return FALSE @@ -1618,6 +1618,7 @@ void init_backup_dir(void) } else { free(backup_dir); backup_dir = full_backup_dir; + snuggly_fit(backup_dir); } } #endif /* !NANO_TINY */ diff --git a/src/nano.c b/src/nano.c index d5c4c91b69218efa42ade7ebf8f97fd0736b9025..02732238a3dceb575feb88c110aee1753f81dac8 100644 --- a/src/nano.c +++ b/src/nano.c @@ -227,7 +227,6 @@ partition *partition_filestruct(filestruct *top, size_t top_x, /* Remove all text before top_x at the top of the partition. */ charmove(top->data, top->data + top_x, strlen(top->data) - top_x + 1); - snuggly_fit(&top->data); /* Return the partition. */ return p;