- Add dialog when changing data directory to empty folder explaining that files need to be copied manually
- Change "Storage Location" to "Data Directory Location" in preferences
This commit is contained in:
parent
1746450abf
commit
2a3b5593b7
2 changed files with 21 additions and 1 deletions
|
@ -754,7 +754,8 @@ To add a new preference:
|
|||
</preferences>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.preferences.dataDir;"/>
|
||||
<!-- TODO: localize with &zotero.preferences.dataDir; -->
|
||||
<caption label="Data Directory Location"/>
|
||||
|
||||
<radiogroup id="dataDir" preference="pref-useDataDir" onsyncfrompreference="onDataDirLoad();" onsynctopreference="return onDataDirUpdate(event);">
|
||||
<radio label="&zotero.preferences.dataDir.useProfile;" value="false"/>
|
||||
|
|
|
@ -556,6 +556,7 @@ var Zotero = new function(){
|
|||
if (file.directoryEntries.hasMoreElements()) {
|
||||
var dbfile = file.clone();
|
||||
dbfile.append('zotero.sqlite');
|
||||
|
||||
// Warn if non-empty and no zotero.sqlite
|
||||
if (!dbfile.exists()) {
|
||||
var buttonFlags = ps.STD_YES_NO_BUTTONS;
|
||||
|
@ -570,6 +571,24 @@ var Zotero = new function(){
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
var buttonFlags = ps.STD_YES_NO_BUTTONS;
|
||||
var index = ps.confirmEx(win,
|
||||
//Zotero.getString('dataDir.selectedDirEmpty.title'),
|
||||
//Zotero.getString('dataDir.selectedDirEmpty.text'),
|
||||
'Directory Empty',
|
||||
'The directory you selected is empty. To move an existing Zotero data directory, '
|
||||
+ 'you will need to manually copy files from the existing data directory to the new location. '
|
||||
+ 'See http://zotero.org/support/zotero_data for more information.\n\nUse the new directory?',
|
||||
|
||||
buttonFlags, null, null, null, null, {});
|
||||
|
||||
// Not OK -- return to file picker
|
||||
if (index == 1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set new data directory
|
||||
Zotero.Prefs.set('dataDir', file.persistentDescriptor);
|
||||
|
|
Loading…
Reference in a new issue