ETCPACK icon indicating copy to clipboard operation
ETCPACK copied to clipboard

Use of system() function for file operations

Open temple-fed opened this issue 3 months ago • 0 comments

Many times throughout etcpack.ccx when a temp file is created and then subsequently removed, or during some sort of file copy operation, instead of calling remove() for example, system("del filename") or system("copy filename destination") is used. Albeit a somewhat lazy solution, the main issue is that it raises concerns regarding performance and platform availability. I think it would be worth taking a look at the file IO as we can always benefit from faster (maybe a bit prettier) code. Case in point being the fileExists function, which could just use the stat function instead of opening and closing the file.

temple-fed avatar Oct 29 '25 18:10 temple-fed