From f29af95a6d3cea2d9bf930b7f5c1fe99026475c6 Mon Sep 17 00:00:00 2001
From: Francesco Cosoleto <cosoleto@gmail.com>
Date: Tue, 9 Feb 2010 03:49:20 +0100
Subject: [PATCH 1/2] Don't try to make directory NULL named in mkdir_cmd().
As input_expand_dialog() may return a pointer to an empty string,
the function was trying to create a directory so named and thus
print a false "File exists" error message.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
src/cmd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/cmd.c b/src/cmd.c
index ba7b792..2c4f2d7 100644
a
|
b
|
mkdir_cmd (void) |
400 | 400 | if (!dir) |
401 | 401 | return; |
402 | 402 | |
| 403 | if (*dir) { |
403 | 404 | if (dir[0] == '/' || dir[0] == '~') |
404 | 405 | absdir = g_strdup (dir); |
405 | 406 | else |
… |
… |
mkdir_cmd (void) |
415 | 416 | } |
416 | 417 | |
417 | 418 | g_free (absdir); |
| 419 | } |
418 | 420 | g_free (dir); |
419 | 421 | } |
420 | 422 | |