[SPARK-1208] Change the default file transfer save path Created: 23/Jan/11  Updated: 28/Oct/20  Resolved: 04/Mar/11

Status: Closed
Project: Spark
Components: General, Linux, macOS, Windows
Affects versions: 2.5.8, 2.6.0
Fix versions: 2.6.0

Type: Improvement Priority: Minor
Reporter: wroot Assignee: Wolf P.
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: Text File 1208-defaultfieltransfer.patch    
Ignite Forum URL: http://community.igniterealtime.org/message/208814#208814

 Description   

Currently if someone logs in into Spark for the first time with say username john@server, then file saving path would be set to \Spark\user\john@server\. If then he logs out and login with different username, the path will stay the same.

This seems as wrong, but it is the same preferences file for every xmpp account you login as long as you are logged with one account in your OS. So changing the same preferences file every time you login with different xmpp account is unlogical and preserving previous changes is complicated, or this will involve altering the whole process how Spark is managing different xmpp accounts and settings for them for the one OS user.

Another option would be to use OS specific paths for saving files like AppData\User\Downloads folders in Windows and /Home/User/Downloads in Ubuntu (linux), probably something similar in Mac OS X. This means, that all downloads will go to the same folder for all xmpp usernames (by default) and if it is changed to some other location, then it should be the same for all the xmpp accounts.

The common paradigm is that only one person should use one OS account, so i think having same folder to save files for every xmpp account that person logs in is ok. Just the current path is not fitting.



 Comments   
Comment by Walter Ebeling [ 27/Feb/11 ]

This is an issue that was requested by a lot of users. Redesign would be helpful.

Comment by Wolf P. [ 28/Feb/11 ]

Is fixed but needs some testing on linux

Comment by Walter Ebeling [ 28/Feb/11 ]

Can you please try the patch and provide feedback to the functionality? I have requested this patch as my users ask the support every so often "Where did Spark save the file transfer".

Comment by wroot [ 28/Feb/11 ]

But where is the patch?

Comment by Mike McMahon [ 28/Feb/11 ]

will test as soon as i can get a patch

Comment by Konstantin Zolotarev [ 01/Mar/11 ]

I'm using Linux. And could test it.

Comment by Konstantin Zolotarev [ 01/Mar/11 ]

Not worked for me.

01.03.2011 12:53:32 org.jivesoftware.spark.util.log.Log error
SEVERE:
Could not create file to write too:
– caused by: java.io.IOException: No such file or directory
at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.recieveFile(IncomingFileTransfer.java:109)
at org.jivesoftware.sparkimpl.plugin.filetransfer.transfer.ui.ReceiveMessage$5.construct(ReceiveMessage.java:241)
at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:141)
at java.lang.Thread.run(Unknown Source)
Nested Exception:
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.recieveFile(IncomingFileTransfer.java:106)
at org.jivesoftware.sparkimpl.plugin.filetransfer.transfer.ui.ReceiveMessage$5.construct(ReceiveMessage.java:241)
at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:141)
at java.lang.Thread.run(Unknown Source)

Comment by Walter Ebeling [ 01/Mar/11 ]

please review&fix

Comment by Konstantin Zolotarev [ 01/Mar/11 ]

Same. (Linux)
I think this is smack issue.

01.03.2011 18:46:54 org.jivesoftware.spark.util.log.Log error
SEVERE:
Could not create file to write too:
– caused by: java.io.IOException: No such file or directory
at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.recieveFile(IncomingFileTransfer.java:109)
at org.jivesoftware.sparkimpl.plugin.filetransfer.transfer.ui.ReceiveMessage$5.construct(ReceiveMessage.java:241)
at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:141)
at java.lang.Thread.run(Unknown Source)
Nested Exception:
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.recieveFile(IncomingFileTransfer.java:106)
at org.jivesoftware.sparkimpl.plugin.filetransfer.transfer.ui.ReceiveMessage$5.construct(ReceiveMessage.java:241)
at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:141)
at java.lang.Thread.run(Unknown Source)

Comment by Wolf P. [ 02/Mar/11 ]

it could be related to the double backslash and case sensitivity of linux

try these two in java/org/jivesoftware/sparkimpl/settings/local/LocalPreferences.java
1.
if (Spark.isLinux() || Spark.isMac())

{ downloadedDir = new File(System.getProperty("user.home") + "/Downloads/"); }

2.

if (Spark.isLinux() || Spark.isMac())

{ downloadedDir = new File(System.getProperty("user.home") + "/downloads/"); }

Comment by Konstantin Zolotarev [ 04/Mar/11 ]

Worked. Error really was with backslashes. Linux & mac uses "/" char except of "\"

Patch in svn

Comment by Walter Ebeling [ 22/Jun/11 ]

Mass closing of all bugs resoved during 2.6.0 and 2.6.1

Generated at Thu Apr 25 10:29:58 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100251-rev:2d0d695520e7095763476433152508933e579798.