[CinCV TNG] [PATCH] Fixed compiler warnings in filesystem.C

Einar Rünkaru einarrunkaru at gmail.com
Mon Jul 3 14:12:25 CEST 2017

On 07/03/2017 12:13 AM, Johannes Sixt wrote:
> Am 02.07.2017 um 17:40 schrieb Einar Rünkaru:
>> getcwd fails if there is a serious error in Cinelerra or filesystem 
>> got corrupted during the run of cinelerra. The safest way on both 
>> situations is to quit immediately.
> No, it is absolutely not a sign of corruption when getcwd() fails. Try it:
> mkdir -p /tmp/temporary
> cd /tmp/temporary
> cinelerra &
> # wait until it is up and running
> cd /tmp
> rmdir /tmp/temporary
> Now open the Preferences dialog and watch the firework.
> It is a situation that can happen to a user.

User can run 'rm -rf /*' as root, pull off HDD cables, pour coke into 
power supply (do not try it!). The question is: should cinelerra stay 
alive after a foolish behaviour of an user?

We can expect that user has a working system and (s)he does not make 
attempt to destroy it wile running cinelerra.
>> Current_dir is used in path completition. Then files are not found or 
>> saved in unexpected locations.
> It is a different question how to best treat the situation. As I said, 
> it is probably the safest to clear current_dir.

No, it is the only reason why getcwd is used.

Attached a new variant of the patch. Speeds things up a bit. Survives 
your test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fixed-compiler-warnings-in-filesystem.C.patch
Type: text/x-patch
Size: 2412 bytes
Desc: not available
URL: <http://lists.cinelerra-cv.org/pipermail/cinelerra/attachments/20170703/023a970d/attachment.bin>

More information about the Cinelerra mailing list