forked from enlightenment/enlightenment
actually we can just strdupa here instead
SVN revision: 80899
This commit is contained in:
parent
925645792e
commit
f4440456f7
|
@ -1243,7 +1243,7 @@ _e_fm_op_copy_link(E_Fm_Op_Task *task)
|
||||||
|
|
||||||
if (symlink(lnk_path, task->dst.name) == -1)
|
if (symlink(lnk_path, task->dst.name) == -1)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char *buf;
|
||||||
|
|
||||||
if (errno == EEXIST)
|
if (errno == EEXIST)
|
||||||
{
|
{
|
||||||
|
@ -1254,14 +1254,14 @@ _e_fm_op_copy_link(E_Fm_Op_Task *task)
|
||||||
}
|
}
|
||||||
if (symlink(lnk_path, task->dst.name) == -1)
|
if (symlink(lnk_path, task->dst.name) == -1)
|
||||||
{
|
{
|
||||||
strncpy(buf, lnk_path, sizeof(buf) - 1);
|
buf = strdupa(lnk_path);
|
||||||
free(lnk_path);
|
free(lnk_path);
|
||||||
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
|
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strncpy(buf, lnk_path, sizeof(buf) - 1);
|
buf = strdupa(lnk_path);
|
||||||
free(lnk_path);
|
free(lnk_path);
|
||||||
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
|
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue