Issue Details (XML | Word | Printable)

Key: CORE-6392
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Basil A. Sidorov
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Space in database path prevent working gbak -se ... -b "pat to/database" backup

Created: 19/Aug/20 04:56 AM   Updated: 27/Aug/20 09:21 AM
Component/s: None
Affects Version/s: 3.0.5, 3.0.6
Fix Version/s: 3.0.7, 4.0 RC 1

QA Status: Done successfully
Test Details:
Implemented only for Windows.
NOTE.
    Some problem still exists when DB file or folder has name which last character is '.' or ' ' (dot or space).
    Database will be created but attempt to backup raises: "gbak: ERROR:cannot open backup file ..."
Test Specifics: Platform (Windows/Linux) specific


 Description  « Hide
databases.conf:
  test = c:/program files/test/test.fdb

and:
> gbak -z -se localhost/13050:service_mgr
 -st dtrw -verbi 2147483647 -b -g
 "test"
 nul
 |findstr "byte time total version"
gbak:gbak version WI-V3.0.5.33220 Firebird 3.0
        Firebird/Windows/AMD/Intel/x64 (access method), version "WI-V3.0.5.33220 Firebird 3.0"
        on disk structure version 12.0
gbak: time delta reads writes
gbak: 0.012 0.000 15 1 database test has a page size of 16384 bytes.
gbak: 0.016 0.000 2 0 closing file, committing, and finishing. 512 bytes written
gbak: 0.016 0.000 88 1 total statistics

vs:
> gbak -z -se localhost/13050:service_mgr
 -st dtrw -verbi 2147483647 -b -g
 "%ProgramFiles%\test\test.fdb"
 nu
 l|findstr "byte time
 total version"
gbak: ERROR:I/O error during "CreateFile (open)" operation for file "C:\PROGRAM"
gbak: ERROR: Error while trying to open file
gbak: ERROR: Нgbak:Exiting before completion due to errors
gbak:gbak version WI-V3.0.5.33220 Firebird 3.0

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Lester Caine added a comment - 19/Aug/20 09:13 AM
There are still many places where the crass way Microsoft decided that space was a valid character in a file name still causes problems and it is normal for safety to always wrap them in double quotes
test = "c:/program files/test/test.fdb"
It is the only way to distinguish white space IN the file name from white space between elements of the data

Basil A. Sidorov added a comment - 19/Aug/20 09:35 AM
Quotes not need into firebird.conf:
> fbsvcmgr localhost:service_mgr
 action_backup
 dbname "%ProgramFiles%\test\test.fdb"
 bkp_file nul
...
gbak:readied database C:\Program Files\test\test.fdb for backup
...
gbak:database C:\Program Files\test\test.fdb has a page size of 16384 bytes.
...
gbak:closing file, committing, and finishing. 512 bytes written