diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 0a46b65..bb61239 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,12 +6,10 @@
-
+
-
-
-
-
+
+
@@ -45,52 +43,28 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -124,29 +98,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1701,6 +1652,8 @@
+
+
@@ -1776,6 +1729,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2117,7 +2092,14 @@
1488472281606
-
+
+ 1488478968380
+
+
+
+ 1488478968382
+
+
@@ -2133,7 +2115,7 @@
-
+
@@ -2141,7 +2123,7 @@
-
+
@@ -2171,11 +2153,27 @@
-
+
+
-
+
+
+
+ file://$PROJECT_DIR$/app/src/main/java/jonas/tool/saveForOffline/PageSaver.java
+ 572
+
+
+
+ file://$PROJECT_DIR$/app/src/main/java/jonas/tool/saveForOffline/PageSaver.java
+ 576
+
+
+
+
+
+
@@ -2184,41 +2182,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -2239,41 +2203,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -2332,41 +2262,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -2403,41 +2299,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -2474,41 +2336,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -2523,50 +2351,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2594,14 +2378,6 @@
-
-
-
-
-
-
-
-
@@ -2613,6 +2389,14 @@
+
+
+
+
+
+
+
+
@@ -2624,13 +2408,31 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/jonas/tool/saveForOffline/PageSaver.java b/app/src/main/java/jonas/tool/saveForOffline/PageSaver.java
index de15c65..82a0279 100644
--- a/app/src/main/java/jonas/tool/saveForOffline/PageSaver.java
+++ b/app/src/main/java/jonas/tool/saveForOffline/PageSaver.java
@@ -574,10 +574,12 @@ private String getFileName(String url) {
}
if (filename.contains("?")) {
- filename = filename.substring(0, filename.indexOf("?"));
+ filename = filename.substring(0, filename.indexOf("?")) + filename.substring(filename.indexOf("?") + 1).hashCode();
}
filename = fileNameReplacementPattern.matcher(filename).replaceAll("_");
+ filename = filename.substring(0, Math.min(200, filename.length()));
+ ;
return filename;
}
diff --git a/app/src/main/java/jonas/tool/saveForOffline/SaveService.java b/app/src/main/java/jonas/tool/saveForOffline/SaveService.java
index 07efe9e..3a9659c 100644
--- a/app/src/main/java/jonas/tool/saveForOffline/SaveService.java
+++ b/app/src/main/java/jonas/tool/saveForOffline/SaveService.java
@@ -152,7 +152,7 @@ public void run() {
notificationTools.notifyFinished(pageSaver.getPageTitle(), newSavedPageDirectory.getPath());
} catch (Exception e) { //so that exceptions don't fpget swallowed and we see them.
- Toast.makeText(SaveService.this, "SaveService Exception: " + e.getMessage(), Toast.LENGTH_LONG);
+ Toast.makeText(SaveService.this, "SaveService Exception: " + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}