Bug 357624

Summary: Grammar download fails
Product: [Applications] parley Reporter: Dimitris Kardarakos <dimkard>
Component: generalAssignee: parley bug tracker <parley-bugs-null>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dimitris Kardarakos 2016-01-06 17:29:44 UTC
During collection creation, even though grammar definition file exists (e.g. http://edu.kde.org/parley/locale/es.kvtml), fetching grammar of this language fails.
In console:
"Cannot download http://edu.kde.org/parley/locale/es.kvtml"
Download of  QUrl("http://edu.kde.org/parley/locale/es.kvtml")  failed.


Reproducible: Always

Steps to Reproduce:
1.Create a new collection, for a language that grammar exists (e.g. spanish > edu.kde.org/parley/locale/es.kvtml)
2. Leave the "Download Grammar" checkbox checked during creation
2. Press OK

Actual Results:  
Download failure

Expected Results:  
Grammar to be downloaded
Comment 1 Andreas Cord-Landwehr 2016-01-13 21:30:16 UTC
Git commit 64b82e59632cbe389986279a15dc5e9ed89e4f1b by Andreas Cord-Landwehr.
Committed on 13/01/2016 at 21:29.
Pushed by cordlandwehr into branch 'master'.

Fix download of remote URLs.

By downloading to a temporary file, file_copy must set to overwrite the
existing (temporary) file. Otherwise, it performs a safety abort. Since
the temporary file is ensured to be just created and not contain any
data, it can safely be overwritten.

M  +2    -2    keduvocdocument/keduvocdocument.cpp

http://commits.kde.org/libkeduvocdocument/64b82e59632cbe389986279a15dc5e9ed89e4f1b