Forum > Linux

Temporary files clash


I've noticed one problem using Lazarus on Linux, I guess it could be called a bug...
Namely, if one user creates a new project (usually defaults to Project1), and it gets compiled before being saved somewhere, Lazarus writes temporary files in /tmp. However, if ANOTHER user then creates a new project (Project1 again) and tries to compile it too without saving, the compile would fail because Lazarus cannot overwrite another user's files. Those files are of course also impossible to delete by a user who does not have write privileges for them, which means anybody but creator or root. The problem does remain even after the first user quits Lazarus, because the files remain there afterwards.

Now, I know it's not so big a deal, it can be worked around easily by just saving the project, and I guess most people use Lazarus on a single user machine (or perhaps they are the only Lazarus user on a multiuser machine), and extremely rarely would occur the situation that two people work on X simulaneously. However, compiling without save can often be an important feature for quick testing something (a component, an algorithm etc.), and the fix to avoid clashing doesn't seem to hard. All it needs to be done would be to create a subdir in /tmp and save temp files there (could be named something like "username-laz" or a random string).

Oh yes, I've observed this behavior in Lazarus 0.28.2...

There is an environment option:
"Directory for building test projects"
You can simply set this to /home/<user>/tmp


[0] Message Index

Go to full version