History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-675
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: James House
Reporter: Aris
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

FileScanJob can not handle spaces or umlauts in directory names

Created: 25/Jun/08 07:47 AM   Updated: 03/Aug/08 03:18 PM
Component/s: Jobs
Affects Version/s: 1.6
Fix Version/s: 1.6.1

Environment: Plain Quartz 1.6.1 on Windows XP with Java 1.6.0-b105


 Description  « Hide
If a space or umlaut is part of the jobs.xml's directory pathname then the scheduler is never updated after a change. The reason is that the spaces in the filename are changed to %20.

You can fix the problem by changing line 116 (method getLastModifiedDate) from

String filePath = resource.getFile();

to

String filePath = URLDecoder.decode(resource.getFile(), "UTF-8");



 All   Comments   Change History      Sort Order:
Aris - [27/Jun/08 02:56 AM ]
I overlooked that you are using Java 1.3.

Therefore, line 116 should be changed to

String filePath = URLDecoder.decode(resource.getFile());



Because the listener of FileScanJob calls fileUpdated with the filename (not with the full path) you need to change JobInitializationPlugin as well. Change line 270-271 (method initialize) from

            JobFile jobFile = new JobFile(stok.nextToken());
            jobFiles.put(jobFile.getFilePath(), jobFile);

to

            final String fileName = stok.nextToken();
            final JobFile jobFile = new JobFile(fileName);
            jobFiles.put(fileName, jobFile);




James House - [03/Aug/08 03:18 PM ]
Fix applied and tested. THanks!