Rev 8944 | Rev 8952 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8944 | Rev 8949 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | size_buf = 10; |
68 | size_buf = 10; |
69 | for (i=0; i |
69 | for (i=0; i |
70 | { |
70 | { |
71 | if (getElementSelectedFlag(i) == true) { |
71 | if (getElementSelectedFlag(i) == true) { |
72 | sprintf(#copy_t,"%s/%s",#path,items.get(i)*304+buf+72); |
72 | sprintf(#copy_t,"%s/%s",path,items.get(i)*304+buf+72); |
73 | path_len = strlen(#copy_t); |
73 | path_len = strlen(#copy_t); |
74 | size_buf += path_len + 1; |
74 | size_buf += path_len + 1; |
75 | } |
75 | } |
76 | } |
76 | } |
77 | buff_data = malloc(size_buf); |
77 | buff_data = malloc(size_buf); |
Line 81... | Line 81... | ||
81 | copy_buf_offset = buff_data + 10; |
81 | copy_buf_offset = buff_data + 10; |
82 | for (i=0; i |
82 | for (i=0; i |
83 | { |
83 | { |
84 | if (getElementSelectedFlag(i) == true) { |
84 | if (getElementSelectedFlag(i) == true) { |
85 | sprintf(copy_buf_offset,"%s/%s",#path,items.get(i)*304+buf+72); |
85 | sprintf(copy_buf_offset,"%s/%s",path,items.get(i)*304+buf+72); |
86 | copy_buf_offset += strlen(copy_buf_offset) + 1; |
86 | copy_buf_offset += strlen(copy_buf_offset) + 1; |
87 | 87 | ||
Line 88... | Line 88... | ||
88 | if (cut_active) { |
88 | if (cut_active) { |
89 | if (i>=files.first) && (i |
89 | if (i>=files.first) && (i |
90 | PutShadow(files.x+4,i-files.first*files.item_h+files.y,icons16_default.w,files.item_h,1,-3); |
90 | PutShadow(files.x+4,i-files.first*files.item_h+files.y,icons16_default.w,files.item_h,1,-3); |
Line 121... | Line 121... | ||
121 | } |
121 | } |
122 | 122 | ||
Line 123... | Line 123... | ||
123 | if (cut_active) { |
123 | if (cut_active) { |
124 | for (j = 0; j < paste_elements_count; j++) { |
124 | for (j = 0; j < paste_elements_count; j++) { |
125 | sprintf(#copy_to, "%s/%s", #path, path_offset+strrchr(path_offset,'/')); |
125 | sprintf(#copy_to, "%s/%s", path, path_offset+strrchr(path_offset,'/')); |
126 | slash_count = 0; |
126 | slash_count = 0; |
127 | for (i=0; i<=10; i++) { |
127 | for (i=0; i<=10; i++) { |
128 | if (copy_to[i]=='/') slash_count++; |
128 | if (copy_to[i]=='/') slash_count++; |
129 | if (slash_count==3) break; |
129 | if (slash_count==3) break; |
130 | } |
130 | } |
Line 146... | Line 146... | ||
146 | path_offset = buf + 10; |
146 | path_offset = buf + 10; |
147 | for (j = 0; j < paste_elements_count; j++) { |
147 | for (j = 0; j < paste_elements_count; j++) { |
148 | strcpy(#copy_from, path_offset); |
148 | strcpy(#copy_from, path_offset); |
149 | if (!copy_from) DialogExit(); |
149 | if (!copy_from) DialogExit(); |
150 | sprintf(#copy_to, "%s/%s", #path, #copy_from+strrchr(#copy_from,'/')); |
150 | sprintf(#copy_to, "%s/%s", path, #copy_from+strrchr(#copy_from,'/')); |
151 | if (streq(#copy_from,#copy_to)) |
151 | if (streq(#copy_from,#copy_to)) |
152 | { |
152 | { |
153 | if (cut_active) continue; |
153 | if (cut_active) continue; |
154 | sprintf(#copy_to, "%s/NEW_%s", #path, #copy_from+strrchr(#copy_from,'/')); |
154 | sprintf(#copy_to, "%s/NEW_%s", path, #copy_from+strrchr(#copy_from,'/')); |
155 | } |
155 | } |
156 | if (strstr(#copy_to, #copy_from)) |
156 | if (strstr(#copy_to, #copy_from)) |
157 | { |
157 | { |
158 | notify("'Not possible to copy directory into itself.\nProcess terminated.' -E"); |
158 | notify("'Not possible to copy directory into itself.\nProcess terminated.' -E"); |
159 | DialogExit(); |
159 | DialogExit(); |