Empty data subdirs getting copied across to build.

Monkey Forums/Monkey Bug Reports/Empty data subdirs getting copied across to build.

Skn3(Posted 2013) [#1]
This is related to this:
http://www.monkeycoder.co.nz/Community/posts.php?topic=4784

If you place an empty folder in your data dir it is getting copied across regardless. This seems as though it needs to skip or delete any data folders that end up being empty.


marksibly(Posted 2013) [#2]
I have a hard time thinking of this as a 'bug' - if you don't want a folder in the output, don't add it to the data dir...or am I missing something?


Skn3(Posted 2013) [#3]
Edzup was requesting to have conditional data directories so I suggested using a "hack" of the TEXT_FILES IMAGE_FILES config vars with a folder named using the current target config var. Works like a charm but some garbage data folders would be left for all the targets apart from the one being compiled for.. it just struck me as a possible oversight so maybe not a bug really?

So if I had:
Data/html5/
Data/html5/file.txt

Data/glfw/
Data/glfw/file.txt

Data/xna/
Data/xna/file.txt

Data/ios
Data/ios/file.txt

And set TEXT_FILES = "/html5/*.txt"

The other three folders would get copied over on build regardless if there ended up being no files in them.


Snader(Posted 2013) [#4]
I don't mind the empty folders but I just found out that when compiling (v72b) for html5, the copied glfw folder is not completely empty. It does contain the .wav, .xml and .jpg files, but not the .png, .txt and .ogg files.

#IMAGE_FILES="/${TARGET}/*.png|*.jpg"
#TEXT_FILES="/${TARGET}/*.txt|*.xml"
#SOUND_FILES="/${TARGET}/*.wav|*.mp3"
#MUSIC_FILES="/${TARGET}/*.ogg|*.wav|*.mp3"

#IF TARGET = "html5"
	Const myTARGET:String = "html5"
#ElseIf TARGET = "glfw"
	Const myTARGET:String = "glfw"
#End

pop = LoadSound(myTARGET + "/pop.wav")