[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: confusing error message in os.rename (bug?)
- From: Rob Kendrick <rjek@...>
- Date: Thu, 18 Oct 2012 14:04:44 +0100
On Thu, Oct 18, 2012 at 03:00:36PM +0200, Wolfram Ladurner wrote:
> $ touch testfile
> $ lua -e 'assert( os.rename( "testfile", "/does/not/exist" ) )'
> lua: <command line>:1: testfile: No such file or directory
> stack traceback:
> [C]: in function `assert'
> <command line>:1: in main chunk
> [C]: ?
>
> The error message looks like the testfile does not exist, while it
> is the new name that is causing the error.
Lua has no way of knowing this, it is just reporting the error that the
ANSI C function has signalled.
B.