@@ -15,6 +15,7 @@ public static void Main(string[] args)
15
15
int RunningTasks = 0 ;
16
16
int MaxTasks = 2 ;
17
17
int HardLimit = 4 ;
18
+
18
19
// Define Filetypes
19
20
string [ ] SearchFor = new string [ ] {
20
21
"materials/*.vmt" ,
@@ -53,7 +54,7 @@ public static void Main(string[] args)
53
54
}
54
55
55
56
// Same as above but instead quitting just set default path as the target path
56
- string copyPath = MainPath + "/../FastDL_Upload/ " ;
57
+ string copyPath = MainPath + $ "/../fastdl- { Path . GetFileName ( MainPath ) } ";
57
58
try
58
59
{
59
60
if ( Directory . Exists ( args [ 1 ] ) )
@@ -166,19 +167,29 @@ void ThreadedCompressing()
166
167
Console . WriteLine ( "All Threads Killed, Generator closed" ) ;
167
168
168
169
// Save the fastdl.lua in the target folder
169
- File . WriteAllText ( copyPath + "/fastdl.lua" , FileData ) ;
170
+ File . WriteAllText ( copyPath + $ "/fastdl- { Path . GetFileName ( MainPath ) } .lua", FileData ) ;
170
171
}
171
172
}
172
173
173
174
}
174
-
175
-
175
+
176
176
private static void CopyFile ( string Filee , string oldFolder , string NewFolder )
177
177
{
178
178
string oldFile = oldFolder + "/" + Filee ;
179
179
string newFile = NewFolder + "/" + Filee ;
180
- Directory . CreateDirectory ( newFile ) ;
181
- Directory . Delete ( newFile ) ; // hacky way
180
+
181
+ try
182
+ {
183
+ Directory . CreateDirectory ( newFile ) ;
184
+ }
185
+ catch ( Exception ) { }
186
+
187
+ try
188
+ {
189
+ Directory . Delete ( newFile ) ; // hacky way
190
+ }
191
+ catch ( Exception ) { }
192
+
182
193
try
183
194
{
184
195
File . Copy ( oldFile , newFile , true ) ;
0 commit comments