Revision: 28381 http://sourceforge.net/p/bibdesk/svn/28381 Author: hofman Date: 2023-10-02 09:12:12 +0000 (Mon, 02 Oct 2023) Log Message: ----------- check whether auto filed file name is not too long
Modified Paths: -------------- trunk/bibdesk/BDSKFiler.h trunk/bibdesk/BDSKFiler.m trunk/bibdesk/de.lproj/Localizable.strings trunk/bibdesk/en.lproj/Localizable.strings trunk/bibdesk/fr.lproj/Localizable.strings Modified: trunk/bibdesk/BDSKFiler.h =================================================================== --- trunk/bibdesk/BDSKFiler.h 2023-09-25 08:41:44 UTC (rev 28380) +++ trunk/bibdesk/BDSKFiler.h 2023-10-02 09:12:12 UTC (rev 28381) @@ -57,7 +57,8 @@ BDSKCannotResolveAliasErrorMask = 1 << 4, BDSKCannotCreateParentErrorMask = 1 << 5, BDSKIncompleteFieldsErrorMask = 1 << 6, - BDSKCancelledErrorMask = 1 << 7 + BDSKFileNameTooLongErrorMask = 1 << 7, + BDSKCancelledErrorMask = 1 << 8 }; typedef NS_OPTIONS(NSUInteger, BDSKFilerOptions) { Modified: trunk/bibdesk/BDSKFiler.m =================================================================== --- trunk/bibdesk/BDSKFiler.m 2023-09-25 08:41:44 UTC (rev 28380) +++ trunk/bibdesk/BDSKFiler.m 2023-10-02 09:12:12 UTC (rev 28381) @@ -237,6 +237,14 @@ [info setValue:newPath forKey:BDSKFilerNewPathKey]; [errorInfoDicts addObject:info]; + } else if ([[newPath lastPathComponent] length] > 255 && force == NO) { + + [info setValue:NSLocalizedString(@"The file name is too long.",@"") forKey:BDSKFilerStatusKey]; + [info setValue:[NSNumber numberWithInteger:BDSKFileNameTooLongErrorMask] forKey:BDSKFilerFlagKey]; + [info setValue:NSLocalizedString(@"Move anyway.",@"") forKey:BDSKFilerFixKey]; + [info setValue:newPath forKey:BDSKFilerNewPathKey]; + [errorInfoDicts addObject:info]; + } else if ([NSString isEmptyString:newPath] || [oldPath isEqualToString:newPath]) { if (isLinkedFiles) Modified: trunk/bibdesk/de.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/bibdesk/en.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/bibdesk/fr.lproj/Localizable.strings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit