Terra Photos 2.0 Now is Released!

TerraMaster smart photo management tool
User avatar
robertsms
Posts: 1
Joined: 30 Apr 2024, 18:08
Australia

Re: Terra Photos 2.0 Now is Released!

Post by robertsms »

Issues with Terra Photos Beta, seems that it doesn't like files or folders with ' apostrophe within name as the SQL inserts are not escaping the data inserted as apostrophe is a reserved character.

Example from logs

[2024/04/30 20:01:47] sql.c:310: error: sql:INSERT INTO PHOTO (NAME, PATH, TYPE, SIZE, TIMESTAMP, DATE, WIDTH, HEIGHT, RESOLUTION, GPSINFO, ROTATION, CREATOR, LENS_MODEL, F_Number, FOCAL_LENGTH, ISO, EXPO_TIME, YEAR, MONTH, DAY, SHORT_TIMESTAMP, FOLDER_TYPE, HOME_USERNAME, PHOTO_DIR) VALUES ('IMG_5021.JPG', '/Volume2/Photos/Photos/Name''s iPhone/DCIM/101APPLE/IMG_5021.JPG', 0, 2657878, 1482627901, '2016-12-25T12:05:00', 3264, 2448, '3264x2448', 'E;150, 55, 41.82;S;33, 42, 53.44', 0, 'Apple', 'iPhone 6', 'f/2.2', '4.2 mm', '32', '1/842 sec.', 2016, 12, 25, 1482584400, 2, '', '/Volume2/Photos/Photos/Name's iPhone/DCIM/101APPLE') ON CONFLICT DO NOTHING; PGSQL 7 ERROR ERROR: syntax error at or near "s"
LINE 1: ...1482584400, 2, '', '/Volume2/Photos/Photos/Name's iPhone/D...
^

[2024/04/30 20:01:47] metadata.c:1190: error: Error inserting photo for '/Volume2/Photos/Photos/Name's iPhone/DCIM/101APPLE/IMG_5021.JPG'!
[2024/04/30 20:01:47] sql.c:310: error: sql:INSERT INTO PHOTO_DIRINFO (SHOW_FOLDER, RELATIVELY_PATH, CHILD_PHOTO_DIR, PARENT_PHOTO_DIR, FOLDER_TYPE, HOME_USERNAME) VALUES ('Name's iPhone', 'Photos/Photos/Name's iPhone', '/Volume2/Photos/Photos/Name's iPhone', '/Volume2/Photos/Photos', 2, '') ON CONFLICT DO NOTHING; PGSQL 7 ERROR ERROR: syntax error at or near "s"
LINE 1: ..._DIR, FOLDER_TYPE, HOME_USERNAME) VALUES ('Name's iPhone',...
^
Post Reply

Return to “Terra Photos”