[Lazarus] strange linux problem
brian
brian at meadows.pair.com
Wed Feb 19 09:46:51 CET 2014
Hi all,
I'm trying to write a small utility program to clean up a LOT of files
on a network drive. This is using Debian 7.2, and a recent svn version
of Lazarus (I actually use fpcup to do the downloads and builds). The
information on the 'About' page is version 1.3, date 2014-02-12, fpc
version 2.6.3, svn revision 44027, x86_64-linux-gtk 2
This may well be a lack of experience with Linux programming on my
part, but it has me baffled. The program I've written needs to do a
bunch of chmods and/or deletes on the files on the network drive.
Stepping through with the debugger, some, but not all, of the
attempted chmods return a status of -1. Some, but not all, of the
calls to sysutils.deletefile return false. What is puzzling me is that
if, instead of calling fpchmod and sysutils.deletefile I instead call
fpsystem and do the operations that way, it works. I can also run up a
command prompt and do the failed operations that way with no problem.
The files on the network drive are all owned by me, the chmod is
trying to set permissions to 644 rather than 777. The delete is just
deleting a whole bunch of log files which got mixed up in there when
the data was copied to the drive.
I have no idea why the above should happen, it makes no sense to me,
but as I said, I'm still a relative novice as regards coding for
Linux. Everything is being run from the same account. Can anybody
point me in the right direction?
Thanks,
Brian.
More information about the Lazarus
mailing list