Subversion Repositories SvarDOS

Rev

Rev 614 | Rev 995 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 614 Rev 994
Line 1... Line 1...
1
/*
1
/*
2
 * This file is part of pkginst
2
 * This file is part of pkg (SvarDOS package manager)
3
 * Copyright (C) 2012-2021 Mateusz Viste
3
 * Copyright (C) 2012-2022 Mateusz Viste
4
 *
4
 *
5
 * It contains a few helper function...
5
 * It contains a few helper function...
6
 */
6
 */
7
 
7
 
8
 
8
 
Line 94... Line 94...
94
    if ((longfilename[x] == '/') || (longfilename[x] == '\\')) {
94
    if ((longfilename[x] == '/') || (longfilename[x] == '\\')) {
95
      lastsep = x;
95
      lastsep = x;
96
      if (firstsep < 0) firstsep = x;
96
      if (firstsep < 0) firstsep = x;
97
    }
97
    }
98
  }
98
  }
-
 
99
  /* if it's a file without any directory, then it goes to C:\ (COMMAND.COM, KERNEL.SYS...) */
-
 
100
  if (firstsep < 0) {
-
 
101
    sprintf(respath, "C:\\");
-
 
102
    return(longfilename);
-
 
103
  }
-
 
104
  /* */
99
  shortfilename = &longfilename[lastsep + 1];
105
  shortfilename = &longfilename[lastsep + 1];
100
  /* look for possible custom path */
106
  /* look for possible custom path */
101
  if (firstsep > 0) {
107
  if (firstsep > 0) {
102
    savedchar = longfilename[firstsep];
108
    savedchar = longfilename[firstsep];
103
    longfilename[firstsep] = 0;
109
    longfilename[firstsep] = 0;