Posted 07 April 2015 - 02:14 PM
The problem is in my startup file which can be found here: http://pastebin.com/2zpMmLs2
—–
I have an IF statement check to see if a file exists and every time I run the program, if it doesn't detect the file, it creates a new one with the string "drives" in it. Now, this works. Then I check to see if there are arguments and, if there are, rewrite the config file to contain the argument passed instead.
However, if I don't give any arguments, the program will rewrite the config file to contain the string "drives", which makes me think that it's re-running through the original IF statement since I'm not modifying the config file else where. However, when I put a print() function in the IF statement, it doesn't call the function but still modifies the config file, which confuses me.
—–
If you want to try the program as I am, here's a pastebin for an installer: http://pastebin.comDVKnYWjY
If anyone could explain why the program's modifying the config file, that'd be great :D/>
—–
I have an IF statement check to see if a file exists and every time I run the program, if it doesn't detect the file, it creates a new one with the string "drives" in it. Now, this works. Then I check to see if there are arguments and, if there are, rewrite the config file to contain the argument passed instead.
However, if I don't give any arguments, the program will rewrite the config file to contain the string "drives", which makes me think that it's re-running through the original IF statement since I'm not modifying the config file else where. However, when I put a print() function in the IF statement, it doesn't call the function but still modifies the config file, which confuses me.
—–
If you want to try the program as I am, here's a pastebin for an installer: http://pastebin.comDVKnYWjY
If anyone could explain why the program's modifying the config file, that'd be great :D/>
Edited on 07 April 2015 - 12:15 PM