diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index daf2779..ac2c73e 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -24,8 +24,6 @@
-
-
diff --git a/src/com/upc/pbe/upcnews/VideoActivity.java b/src/com/upc/pbe/upcnews/VideoActivity.java
index aef0aa1..b999ae2 100644
--- a/src/com/upc/pbe/upcnews/VideoActivity.java
+++ b/src/com/upc/pbe/upcnews/VideoActivity.java
@@ -6,6 +6,7 @@ import io.vov.vitamio.widget.MediaController;
import io.vov.vitamio.widget.VideoView;
import java.io.BufferedInputStream;
+import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -230,7 +231,14 @@ public class VideoActivity extends Activity {
// Iniciem la connexi� i creem els Streams
try
{
- FileOutputStream out = new FileOutputStream(filePath + fileName,true);
+ int index = 0;
+ String newFileName = fileName;
+ while(new File(filePath + newFileName).exists())
+ {
+ newFileName = fileName + index++;
+ }
+ fileName = newFileName;
+ FileOutputStream out = new FileOutputStream(filePath + fileName);
BufferedInputStream in = new BufferedInputStream(urls[0].openStream());
Log.d(TAG, "\nDescarregant: \n");
Log.d(TAG, ">> URL: " + urls[0]);