[Pkg-mozext-commits] [automatic-save-folder] 105/133: Add: Added a log in the console when ASF change the local path. Fix: More fixes when saving on Firefox 7.0.1+ (Fixed the known bug from v1.0.4)

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch wip
in repository automatic-save-folder.

commit 8bd3aa024b7fa6d86158b3042739dafda7bc9367
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Sat Feb 4 14:52:19 2012 +0000

    Add: Added a log in the console when ASF change the local path.
    Fix: More fixes when saving on Firefox 7.0.1+ (Fixed the known bug from v1.0.4)
    
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@114 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf_download.js    | 8 ++++++--
 content/asf_right_click.js | 7 +++++--
 content/common.dtd         | 2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/content/asf_download.js b/content/asf_download.js
index 1f34f12..f23e3e0 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -90,7 +90,7 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
 		}
 		if (this.firefoxversion >= 7.01) 
 		{
-			this.current_uri = currentDomain.replace(/^.*:\/\//g,'');
+			this.current_uri = domain.replace(/^.*:\/\//g,'');
 			if (this.current_uri == "") this.current_uri = tabLocation.href; // fix website opening a new about:blank page when clicking on a download link, and that tab is not auto-closing.
 			
 			// read lastpath for that uri
@@ -262,7 +262,8 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
 				}
 				if (this.firefoxversion >= 7.01 && this.prefManager.getBoolPref("extensions.asf.useSiteBySiteSavePath") == true)
 				{
-					lastpath = gDownloadLastDir.getFile(this.current_uri).path;
+					var file = gDownloadLastDir.getFile(this.current_uri);
+					if (file != null) lastpath = file.path;
 				}
 				this.set_savepath(lastpath);
 			}
@@ -425,6 +426,9 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
 			// alert("uri="+uri+"\noldpath ="+file.path+"\nnewpath ="+directory.path);
 			gDownloadLastDir.setFile(uri, directory);
 		}
+		
+		
+		if (this.logtoconsole && !this.inPrivateBrowsing) this.console_print("save location changed to: "+directory.path);
 	},
 	
 	
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index 0ca5f31..4334fd5 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -146,7 +146,7 @@ var automatic_save_folder = {
 				var fileURLAndFilename = domain+"/"+filename;
 			}
 			
-			if (this.firefoxversion >= 7.01) this.current_uri = currentDomain.replace(/^.*:\/\//g,'');
+			if (this.firefoxversion >= 7.01) this.current_uri = domain.replace(/^.*:\/\//g,'');
 			
 			var domain_testOrder = prefManager.getCharPref("extensions.asf.domainTestOrder");
 			if (this.trim(domain_testOrder) == "") domain_testOrder = "1,5";
@@ -305,7 +305,8 @@ var automatic_save_folder = {
 					}
 					if (this.firefoxversion >= 7.01 && this.prefManager.getBoolPref("extensions.asf.useSiteBySiteSavePath") == true)
 					{
-						lastpath = gDownloadLastDir.getFile(this.current_uri).path;
+						var file = gDownloadLastDir.getFile(this.current_uri);
+						if (file != null) lastpath = file.path;
 					}
 					this.set_savepath(lastpath);
 				}
@@ -381,6 +382,8 @@ var automatic_save_folder = {
 			// alert("uri="+uri+"\noldpath ="+file.path+"\nnewpath ="+directory.path);
 			gDownloadLastDir.setFile(uri, directory);
 		}
+		
+		if (this.logtoconsole && !this.inPrivateBrowsing) this.console_print("save location changed to: "+directory.path);
 	},
 	
 	
diff --git a/content/common.dtd b/content/common.dtd
index 6434c0d..c46a717 100644
--- a/content/common.dtd
+++ b/content/common.dtd
@@ -1,5 +1,5 @@
 <!-- Current version -->
-<!ENTITY asf.version "1.0.4">
+<!ENTITY asf.version "1.0.5bRev114">
 
 <!ENTITY about.translators "
 - cs : Stanislav Horáček<br />

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/automatic-save-folder.git



More information about the Pkg-mozext-commits mailing list