@@ -231,7 +231,7 @@ public class JabRefCliPreferences implements CliPreferences {
231
231
public static final String CONFIRM_LINKED_FILE_DELETE = "confirmLinkedFileDelete" ;
232
232
public static final String TRASH_INSTEAD_OF_DELETE = "trashInsteadOfDelete" ;
233
233
public static final String COPY_LINKED_FILES = "copyLinkedFiles" ;
234
- public static final String COPY_LINKED_FILES_DIRECTORY_PATH = "copyLinkedFilesDirectoryPath " ;
234
+ public static final String LINKED_FILEDIRPATTERN = "linkedFileDirPattern " ;
235
235
public static final String WARN_BEFORE_OVERWRITING_KEY = "warnBeforeOverwritingKey" ;
236
236
public static final String AVOID_OVERWRITING_KEY = "avoidOverwritingKey" ;
237
237
public static final String AUTOLINK_EXACT_KEY_ONLY = "autolinkExactKeyOnly" ;
@@ -255,7 +255,6 @@ public class JabRefCliPreferences implements CliPreferences {
255
255
public static final String CLEANUP_FIELD_FORMATTERS = "CleanUpFormatters" ;
256
256
public static final String IMPORT_FILENAMEPATTERN = "importFileNamePattern" ;
257
257
public static final String IMPORT_FILEDIRPATTERN = "importFileDirPattern" ;
258
- public static final String IMPORT_FILEDIRPATTERN1 = "importFileDirPattern1" ;
259
258
public static final String NAME_FORMATTER_VALUE = "nameFormatterFormats" ;
260
259
public static final String NAME_FORMATER_KEY = "nameFormatterNames" ;
261
260
public static final String SHOW_RECOMMENDATIONS = "showRecommendations" ;
@@ -609,8 +608,9 @@ protected JabRefCliPreferences() {
609
608
defaults .put (STORE_RELATIVE_TO_BIB , Boolean .TRUE );
610
609
611
610
defaults .put (AUTOLINK_EXACT_KEY_ONLY , Boolean .FALSE );
611
+
612
612
defaults .put (COPY_LINKED_FILES , Boolean .TRUE );
613
- // defaults.put(COPY_LINKED_FILES_DIRECTORY_PATH, Boolean.TRUE );
613
+ defaults .put (LINKED_FILEDIRPATTERN , "" );
614
614
615
615
defaults .put (AUTOLINK_FILES_ENABLED , Boolean .TRUE );
616
616
defaults .put (LOCAL_AUTO_SAVE , Boolean .FALSE );
@@ -629,7 +629,6 @@ protected JabRefCliPreferences() {
629
629
defaults .put (IMPORT_FILENAMEPATTERN , FilePreferences .DEFAULT_FILENAME_PATTERNS [1 ]);
630
630
// Default empty String to be backwards compatible
631
631
defaults .put (IMPORT_FILEDIRPATTERN , "" );
632
- defaults .put (IMPORT_FILEDIRPATTERN1 , "" );
633
632
// Download files by default
634
633
defaults .put (DOWNLOAD_LINKED_FILES , true );
635
634
// Create Fulltext-Index by default
@@ -1548,12 +1547,6 @@ public FieldPreferences getFieldPreferences() {
1548
1547
protected boolean moveToTrashSupported () {
1549
1548
return false ;
1550
1549
}
1551
- protected boolean copyLinkedFilesSupported () {
1552
- return false ;
1553
- }
1554
- protected String copyLinkedFilesDirectoryPathSupported (){
1555
- return "fuck this" ;
1556
- }
1557
1550
1558
1551
@ Override
1559
1552
public FilePreferences getFilePreferences () {
@@ -1567,7 +1560,6 @@ public FilePreferences getFilePreferences() {
1567
1560
getBoolean (STORE_RELATIVE_TO_BIB ),
1568
1561
get (IMPORT_FILENAMEPATTERN ),
1569
1562
get (IMPORT_FILEDIRPATTERN ),
1570
- get (IMPORT_FILEDIRPATTERN1 ),
1571
1563
getBoolean (DOWNLOAD_LINKED_FILES ),
1572
1564
getBoolean (FULLTEXT_INDEX_LINKED_FILES ),
1573
1565
Path .of (get (WORKING_DIRECTORY )),
@@ -1577,26 +1569,25 @@ public FilePreferences getFilePreferences() {
1577
1569
getBoolean (CONFIRM_LINKED_FILE_DELETE ),
1578
1570
// We make use of the fallback, because we need AWT being initialized, which is not the case at the constructor JabRefPreferences()
1579
1571
getBoolean (TRASH_INSTEAD_OF_DELETE , moveToTrashSupported ()),
1580
- getBoolean (COPY_LINKED_FILES , copyLinkedFilesSupported () ),
1581
- get ( COPY_LINKED_FILES_DIRECTORY_PATH , copyLinkedFilesDirectoryPathSupported () ),
1582
- getBoolean ( KEEP_DOWNLOAD_URL ));
1572
+ getBoolean (KEEP_DOWNLOAD_URL ),
1573
+ getBoolean ( COPY_LINKED_FILES ),
1574
+ get ( LINKED_FILEDIRPATTERN ));
1583
1575
1584
1576
EasyBind .listen (getInternalPreferences ().getUserAndHostProperty (), (obs , oldValue , newValue ) -> filePreferences .getUserAndHostProperty ().setValue (newValue ));
1585
1577
EasyBind .listen (filePreferences .mainFileDirectoryProperty (), (obs , oldValue , newValue ) -> put (MAIN_FILE_DIRECTORY , newValue ));
1586
1578
EasyBind .listen (filePreferences .storeFilesRelativeToBibFileProperty (), (obs , oldValue , newValue ) -> putBoolean (STORE_RELATIVE_TO_BIB , newValue ));
1587
1579
EasyBind .listen (filePreferences .fileNamePatternProperty (), (obs , oldValue , newValue ) -> put (IMPORT_FILENAMEPATTERN , newValue ));
1588
1580
EasyBind .listen (filePreferences .fileDirectoryPatternProperty (), (obs , oldValue , newValue ) -> put (IMPORT_FILEDIRPATTERN , newValue ));
1589
- EasyBind .listen (filePreferences .linkedFileDirectoryProperty (), (obs , oldValue , newValue ) -> put (IMPORT_FILEDIRPATTERN1 , newValue ));
1590
1581
EasyBind .listen (filePreferences .downloadLinkedFilesProperty (), (obs , oldValue , newValue ) -> putBoolean (DOWNLOAD_LINKED_FILES , newValue ));
1591
1582
EasyBind .listen (filePreferences .fulltextIndexLinkedFilesProperty (), (obs , oldValue , newValue ) -> putBoolean (FULLTEXT_INDEX_LINKED_FILES , newValue ));
1592
1583
EasyBind .listen (filePreferences .workingDirectoryProperty (), (obs , oldValue , newValue ) -> put (WORKING_DIRECTORY , newValue .toString ()));
1593
1584
EasyBind .listen (filePreferences .createBackupProperty (), (obs , oldValue , newValue ) -> putBoolean (CREATE_BACKUP , newValue ));
1594
1585
EasyBind .listen (filePreferences .backupDirectoryProperty (), (obs , oldValue , newValue ) -> put (BACKUP_DIRECTORY , newValue .toString ()));
1595
1586
EasyBind .listen (filePreferences .confirmDeleteLinkedFileProperty (), (obs , oldValue , newValue ) -> putBoolean (CONFIRM_LINKED_FILE_DELETE , newValue ));
1596
1587
EasyBind .listen (filePreferences .moveToTrashProperty (), (obs , oldValue , newValue ) -> putBoolean (TRASH_INSTEAD_OF_DELETE , newValue ));
1597
- EasyBind .listen (filePreferences .copyLinkedFilesProperty (), (obs , oldValue , newValue ) -> putBoolean (COPY_LINKED_FILES , newValue ));
1598
- EasyBind .listen (filePreferences .copyLinkedFilesDirectoryPathProperty (), (obs , oldValue , newValue ) -> put (COPY_LINKED_FILES , newValue ));
1599
1588
EasyBind .listen (filePreferences .shouldKeepDownloadUrlProperty (), (obs , oldValue , newValue ) -> putBoolean (KEEP_DOWNLOAD_URL , newValue ));
1589
+ EasyBind .listen (filePreferences .copyLinkedFilesProperty (), (obs , oldValue , newValue ) -> putBoolean (COPY_LINKED_FILES , newValue ));
1590
+ EasyBind .listen (filePreferences .linkedFileDirectoryProperty (), (obs , oldValue , newValue ) -> put (LINKED_FILEDIRPATTERN , newValue ));
1600
1591
1601
1592
return filePreferences ;
1602
1593
}
0 commit comments