comparison dvd_reader.c @ 53:f7e7938944e9 src

As for win32 strip off the trailing \ if it is not a drive on OS/2. Patch by Komh chollian net
author nicodvb
date Tue, 20 Jul 2010 07:55:32 +0000
parents 645a8b52b951
children de60b270bd83
comparison
equal deleted inserted replaced
52:645a8b52b951 53:f7e7938944e9
339 int ret, have_css, retval, cdir = -1; 339 int ret, have_css, retval, cdir = -1;
340 dvd_reader_t *ret_val = NULL; 340 dvd_reader_t *ret_val = NULL;
341 char *dev_name = NULL; 341 char *dev_name = NULL;
342 char *path = NULL, *new_path = NULL, *path_copy = NULL; 342 char *path = NULL, *new_path = NULL, *path_copy = NULL;
343 343
344 #ifdef _WIN32 344 #if defined(_WIN32) || defined(__OS2__)
345 int len; 345 int len;
346 #endif 346 #endif
347 347
348 if( ppath == NULL ) 348 if( ppath == NULL )
349 goto DVDOpen_error; 349 goto DVDOpen_error;
353 goto DVDOpen_error; 353 goto DVDOpen_error;
354 354
355 /* Try to open libdvdcss or fall back to standard functions */ 355 /* Try to open libdvdcss or fall back to standard functions */
356 have_css = dvdinput_setup(); 356 have_css = dvdinput_setup();
357 357
358 #ifdef _WIN32 358 #if defined(_WIN32) || defined(__OS2__)
359 /* Strip off the trailing \ if it is not a drive */ 359 /* Strip off the trailing \ if it is not a drive */
360 len = strlen(path); 360 len = strlen(path);
361 if ((len > 1) && 361 if ((len > 1) &&
362 (path[len - 1] == '\\') && 362 (path[len - 1] == '\\') &&
363 (path[len - 2] != ':')) 363 (path[len - 2] != ':'))